Static Typing in JavaScript: Typescript vs Flow Annotations
Recently I gave a brownbag presentation at work regarding static typing and how to implement it in JavaScript. The two means of implementing it that I detailed were by using Microsoft’s Typescript or Facebook’s Flow Annotations.I then compared the two and discussed the advantages and disadvantages of each.
I also included a code example that showed how to implement each in our current app, which I unfortunately cannot share publicly.
In summation, I preferred Typescript over Flow for the following reasons:
It supports Windows (at the time of this writing there is no official Windows version of Flow).
Way more definition files available.
Native sourcemap support.
Larger community. I found it difficult to find answers to questions I had about using Flow.
Click here to view the slideshow online.















