Hacker News new | ask | show | jobs
by chrstphrhrt 2242 days ago
Same. I have tried using it and enjoyed the IDE powers a bit more, but already knowing JS quite well, it wasn't a game changer.

Lately I have started using FastAPI in Python, which uses Pydantic to enforce type hints at runtime. This saves a lot of manual checking code (e.g. "if input_data["mykey"] == "unhappy path": raise ValidationError").

This was the same annoyance in Node.js because the types are so flimsy and manually checking is really boring. Tests are great but if you can have correctness while rapidly prototyping that would seem to be a win.

Is there a great TS lib to do runtime type reflection like Pydantic?

1 comments