4 ms·
You don't have to commit to a big up-front effort. You can take an incremental approach and add type annotations as you need them. Also, I'm not sure how addi
by steego 9y ago
You don't have to commit to a big up-front effort. You can take an incremental approach and add type annotations as you need them.
Also, I'm not sure how adding type annotations results in over-engineered solutions. Types are just little sanity checks you spread around your code to help the compiler and linters to catch inconsistencies. You shouldn't have to re-engineer everything.
- Waterluvian 9y agoMy understanding is that now I have to also manage type definitions. It ends up being more code in my files and more files. I'm a big fan of keeping files as minimal and simple as possible. I virtually "count" the number of language concepts that exist, and try to keep it as low as possible. Makes it easy for other developers to on-board and for me to re-on-board.
- brlewis 9y agoYou don't have to do anything. Just drop TypeScript in as a replacement for babel. Whenever you find yourself wondering if a type annotation or definition would help, then do it. Leave it optional; no commitment required.
- ake1 9y agoyou don't actually have to manage type definitions for your own code (unless you're referring to typing parameter/return values), just things that you eg. fetch from the backend. those can be trivially generated by a tool from sample json or you can generate it all from things like OpenAPI.