- #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 a property into Polka request handlers and annotating it. My intent is clear and the type checker’s happy.