New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(types): correct typescript function headers #10404
Conversation
Flow maybe types state; > Maybe types accept the provided type as well as null or undefined. So ?number would mean number, null, or undefined. So in this case, explicitly allow the type, null, or undefined in the typescript definition. Fixes #10403
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11500/ |
Build successful! You can test your changes in the REPL here: https://babeljs.io/repl/build/11499/ |
precedent found on L149
I have re-cecked our source code and I think that it shouldn't be nullable. It's probably an error I introduced at
placeholderType: ?string, |
Flow maybe types state; > Maybe types accept the provided type as well as null or undefined. So ?number would mean number, null, or undefined. So in this case, explicitly allow the type, null, or undefined in the typescript definition. Fixes #10403
Merged as 15b63bc. Thank you! |
Flow maybe types state;
So in this case, explicitly allow the type, null, or undefined in the
typescript definition.