
Ask HN: Should add typescript to my stack or Flow is enough? - efi_mk
#javascript and #typescript users, doing my first steps in JS (after coming from Python). I still don&#x27;t have a clear answer on whether I should add typescript to my stack ? Types are important for me, so why not settle for Flow ?<p>Problems that I see 
1. Complicates tooling
2. Another language to learn<p>I intend to use NodeJS 8.1 (supported by AWS Lambda) which supports ES2016, is it good enough for enterprise grade projects?<p>Help appreciated
======
jeremychone
I would recommend TypeScript. I was a "pure JS" for years and avoided the GWT,
CoffeeScript, and Dart kind of languages. We even avoided Babel as the added
value was not there for us).

However, TypeScript is a whole different game, as it is really a superset of
JavaScript and let you almost all you can do in JS. The industry support is
amazing, most of the major node lib comes with their TypeScript types (from
the project itself or from @types/...), and the tooling support in VSCode for
example is just amazing.

I looked at Flow a little, and while it seems less intrusive, I am not sure it
is as expressive, powerful, and mature as TypeScript typing system.

The trick to realize is that it is not because you have "class", interface,
and generics that you have to code JS the Java way. TypeScript does not change
your style of writing JS, it just makes it more robust and scalable (with the
number of developers & line of code).

~~~
efi_mk
Tx. Are there any clear benefits comparing it to es2016 + Flow ?

~~~
jeremychone
I just looked at flow briefly, but for what I can see, TS is a much more
advanced typing system, the tool support is amazing (VSCode for example), and
most libs today are TypeScript typed one way or another. The later is probably
the one as it add for most node libs, intellisense, hover / option-click to
drill on the method signatures, and most of the time it will get you to the
full lib API description. Productivity is through the roof with those alone.

