With rewire typecheck seems to get confused with type aliases. I had (beware, example code follows)
type Foo = { bar: string }
function foo(arg: Foo): Promise<Foo> {
}
And my jasmine tests failed due to typecheck erroring incorrectly because { bar: string } did not match Foo.
After moving rewire to the front of the .babelrc plugin list the error disappeared. By introducing an artificial type error I get typecheck to error correctly so this seems to be a good workaround.
@sakari the passPerPreset option in the latest babel seems to fix most of these issues. Leaving this open to remind me to add a note about it to the README.
With rewire typecheck seems to get confused with type aliases. I had (beware, example code follows)
And my jasmine tests failed due to typecheck erroring incorrectly because
{ bar: string }
did not matchFoo
. After moving rewire to the front of the .babelrc plugin list the error disappeared. By introducing an artificial type error I get typecheck to error correctly so this seems to be a good workaround.