4 ms·
Interesting. I was considering Flow and was going to begin using it by sprinkling it in using their Comment Types[1]. I wanted something that I could use but a
by flanbiscuit 8y ago
Interesting. I was considering Flow and was going to begin using it by sprinkling it in using their Comment Types[1]. I wanted something that I could use but also make it optional for the other devs. Only because I was just wanted to test it out and not fully commit to making the team use it right away.
[1] https://flow.org/en/docs/types/comments/ https://flow.org/en/docs/types/comments/
- ggregoire 8y agoI'd love to still recommend Flow, and as I said the techno is good and does the job, and they continue to release new versions, but I just don't see what benefits you would get by choosing Flow over TS at this point. Flow and TS do exactly the same job, with almost the same syntax (with different ways to transform it in JS tho), but TS has a bigger community and MS seems to put more efforts/resources into it. This has been true for 1 or 2 years now, so…
- dinja15 8y agoTypescript also supports comment typing via JSDoc. I write complex types in a definition file and use them in JSDoc. Works great. https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-in-JavaScript https://github.com/Microsoft/TypeScript/wiki/JSDoc-support-i...
- flanbiscuit 8y agoHold on, TS can typecheck your code just by using your jsdoc annotations?! That's a game changer for me!
- egeozcan 8y agoYes and it works quite well. Sometimes JSDoc fails to provide enough info about the types though.