TypeScript is no different than writing comments after JavaScript variables describing their type.
Discussion
You have to compile though.
Them IDE type hints and erros though
... and makes your life so much easier afterwards.
No.
there's no compiler checks?
It also understands the “default” type when you don’t write a specific type. For example:
const x = 5;
is like:
const x: number = 5:
And that’s extremely important for other developers and your future self to use/change the code without breaking things.
false. comments don’t give you compile time guarantees. this goes a long way for maintainability over time.
Same with Python.
It's disgusting 🤢