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

Object with default nullable value for a key error #173

Closed elado closed 7 years ago

elado commented 8 years ago
function x(a: string, { b=a }: { b?: string } = { b: a }) {
}

Compiles nicely with Flow, but this plugin errors:

Property value expected type of number but got string
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.