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

Optional types should allow null as a value #170

Closed kriszyp closed 7 years ago

kriszyp commented 8 years ago

Optional types should allow null as a value, according to Flowtype and TypeScript. For example, this should be allowed:

function foo(bar: ?{}) {
}
foo(null)
phpnode commented 7 years ago

Hi, sorry for taking so long to respond to this, this project is now deprecated in favour of https://codemix.github.io/flow-runtime which aims for full compatibility with Flow.

I checked and babel-plugin-flow-runtime does not have this particular bug.