Type checker for JavaScript?

Google closure compiler does some type checking if you follow their recommendations for annotating your functions with jsDoc comments. See http://code.google.com/closure/compiler/docs/js-for-compiler.html


One another option - https://github.com/yarax/typelint

It's an EsLint plugin, that does type check based on JSDoc annotations.

In addition it supports it's own extension to use Redux state or Swagger schemas (basically any JSON schema) for type check. So you don't need to describe complex composite types by yourself.