Try out Facebook’s Flow typechecker online

(Ad, please don’t block)

You can now try out Flow [1], Facebook’s typechecker for JavaScript, online, at

The following example demonstrates Flow‘s power:

function mul(x,y) {
    return x * y;
mul('a', 'b'); // static error

The last line produces a static (“compile time”) error, because Flow infers the signature:

function mul(x : number, y : number) : number

In contrast, TypeScript infers the following signature (which you can check in the TypeScript Playground):

function mul(x : any, y : any) : number

Further reading:

  1. Statically typed JavaScript via Microsoft TypeScript, Facebook Flow and Google AtScript ↩︎