3 ms·
You may also consider Flow. It is literally JavaScript plus type annotations. The annotations can be even put into comments turning the files into vanilla JS ma
by fpoling 7y ago
You may also consider Flow. It is literally JavaScript plus type annotations. The annotations can be even put into comments turning the files into vanilla JS making this very clear. So there is no danger that if FB abandons it one ends up with code that needs to be converted.
On the other hand Flow is much less cool than TypeScript these days. Plus using it for development under Windows have issues, although FB has started paying attention to them.
- Zarel 7y agoTypeScript annotations can also be put into comments. I like TypeScript's approach (JSDoc) better, actually, because it's how you'd want to annotate them even if you didn't have a typechecker, anyway. Although I still hit enough annoyances that I'd go straight to `.ts` files for my next project.
- FeloniousHam 6y agoWe started out with Flow, but moved to Typescript not because it's "cool" (I suspect it's the Flow users who are smoking clove cigarettes in black berets), but because the language improvements and tooling support are a huge productivity boost. The killer is how flexible it is, it incrementally scales from straight JS to full-on type religion. You only have to use as much as you find useful.