4 ms·
> Flow has a lot of bugs and a lot of growth ahead of it, but it is far easier to get started with than TS. I know this was definitely the case when I started
by Eridrus 11y ago
> Flow has a lot of bugs and a lot of growth ahead of it, but it is far easier to get started with than TS.
I know this was definitely the case when I started using TS a few years ago, but they recently added support for compiling .js files in your typescript projects, so you only need to deal with the compiler one file at a time.
Admittedly I haven't used it, but I think it should have made the migration easier. Probably still not as easy as Flow, but easier...
- STRML 11y agoThat does help a lot and was a long time coming. TS is a little harder to get started with for a few reasons. For one, it simply does more, with features like interfaces (which "sort of" exist in Flow), and public/private accessors. One distinct advantage of Flow is that it is not a build step, but is more like a linter. I like this - it doesn't re-invent the wheel, so you don't have to choose between having the latest features or being fully TS-compatible. On the other hand, Flow's typechecking is far less complete, and it still uses its own home-rolled parser which occasionally has issues parsing certain ES2016+ features, such as decorators. If I were starting a project from scratch, I would likely use TS as it's simply more complete. But if I were migrating an existing project, Flow starts paying off right away and is easy to integrate.
- Akkuma 11y agoAs you mentioned, Flow not being a build step seems to be a big win to me. A lot of different tools use or encourage you to use babel and babel is ahead of TypeScript in ES6/ES7, http://kangax.github.io/compat-table/es6/ http://kangax.github.io/compat-table/es6/. If you use TypeScript your chain suddenly becomes much slower/more complex.