Closed sgodwin424 closed 8 years ago
This seems to have partially fixed the issue. It does fix properties that can be undefined or a value (thus name?: ...), but it still fails to properly deal with nullable types (name: ?string). It gives the same error message as before.
I think adding && maybeNullableAnnotation(aprops.value) === false
at https://github.com/codemix/babel-plugin-typecheck/blob/master/src/index.js#L725 will fix it, but I don't understand enough about the library to be sure.
I will add a pull request after Thanksgiving if you haven't already gotten around to fixing it.
The 3.2.0 update seems to have messed up default parameters in some way. Specifically, the following example worked before the update, and fails after the update:
The error message is:
I have not tested more basic default parameter examples.