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

Support object spread destructuring #16

Closed cesarandreu closed 8 years ago

cesarandreu commented 9 years ago

With the following code:

function fn ({ a, ...b }: Object): Object {
  return { a, b }
}

It'll leave the object spread as-is, so when webpack processes it, it'll throw an error: Unexpected token ....