Adopting Flow & TypeScript
James Kyle
37724

This post is riddled with factual inaccuracies, and it does a disservice to both TypeScript and Flow users by arming them with incorrect ideas.

Implicitly cast every unknown type to any. This any type will opt you out of all type checking
This means that the amount of code covered by TypeScript is tied to the types that you have written. Type coverage goes up linearly as you write types.

TypeScript infers types whenever it’s safe to do so, and in practice a sizeable chunk of TS code is assigned a type without having to write any types. Let’s take this example:

const x = 10;
x.splice(0, 1);

This will generate a typeerror in TypeScript because x is inferred to be a number, and the number type doesn’t have the splice method on it.

TypeScripts type inference engine is more conservative than Flow’s type inference engine, but it absolutely has one too, and type coverage does not go up linearly as a result. TypeScript and Flow both have similar type coverage graphs, their curves are just a little different because of differences in how aggressive/conservative each team has decided to make their compilers.

Your graph is flat out misleading as a result.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.