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

ReferenceError with variables declarations and intersection types #161

Closed gcanti closed 7 years ago

gcanti commented 8 years ago

Test cases:

const x: number & number = 1
const obj: { a: number } & { b: number } = { a: 1, b: 2 }

Throws ReferenceError: compareIntersectionAnnotation is not defined

phpnode commented 7 years ago

Hey @gcanti, I've deprecated this in favour of flow-runtime and published a first version to https://codemix.github.io/flow-runtime I checked and babel-plugin-flow-runtime does not have this particular bug.