Add Flow

A static type checker for JavaScript

Fixes #5042