by wilsonnb3 · 2y ago · 0 comments
This is how type checking works in python and ruby, rather than there being a compilation step like typescript.
Before type annotations were officially added in python 3.5, you could still use mypy for type checking. The only difference being that the type hint format wasn’t standardized across tools.
The difference between this approach and the typescript approach is that typescript isn’t valid JavaScript, you need a build step that converts it. JavaScript with JSDoc type annotations is valid JavaScript, just with special comments in it, so it doesn’t need to be converted before it is run.