3 ms·
I was kind of frustrated for a while with the broken type system of Javascript, as well as with the lack of easy type checking. I then wrote a simple small libr
by phazelift 11y ago
I was kind of frustrated for a while with the broken type system of Javascript, as well as with the lack of easy type checking. I then wrote a simple small library to make my life a little easier. It's called types.js, in NPM as well..
Changing my entire code to TypeScript just feels a bit over the top to achieve only static type checking. I now only dynamically check if needed. I believe there are so much worse and important problems we are dealing with as Javascript developers today that need attention.
I really believe WASM will become the base for a great new language that eventually will make Javascript, TypeScript and so many others deprecated, solving a zillion problems at once.
- STRML 11y agoTry Flow, if you haven't yet. It's not as complete as TS, but it gets out of your way and requires minimal investment. I find that the `(foo: string, bar: number)` annotation style is just far more readable than e.g. JSDoc. You don't even really need to be running Flow (babel will strip them), but it's practically free - why not.