- #JavaScript is a wonderfully dynamic language and its dynamic features afford you a great deal of expressiveness.
- Strong typing is useful for catching errors before runtime.
These two statements don’t have to be mutually exclusive.
Instead of shackling yourself to #TypeScript™ 2023™ Enterprise Edition™, you can use #JSDoc to get the best of both worlds.
Here, for example, I’m mixing in a property into Polka request handlers and documenting it. Intent is clear and type checker is happy.