codemix / babel-plugin-typecheck

Static and runtime type checking for JavaScript in the form of a Babel plugin.
MIT License
886 stars 44 forks source link

allow async functions to return Promise<T> #105

Closed phpnode closed 8 years ago

phpnode commented 8 years ago

Work in progress.

Async functions should allow Promise<T> as their annotation as well as T. Right now we're incompatible with flow which only allows Promise<T>.

As part of this we should also allow returning instances of Promise, probably via a check for .then() rather than instanceof.

ping @tp