Skip to content
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

Extend maybe type, maybe... #3433

Closed
alex35mil opened this issue Feb 26, 2017 · 2 comments
Closed

Extend maybe type, maybe... #3433

alex35mil opened this issue Feb 26, 2017 · 2 comments

Comments

@alex35mil
Copy link

Sorry if it was discussed before or it doesn't make any sense, but:

?string -> string | null
??string -> string | null | void

Thoughts?

@jesseschalken
Copy link
Contributor

While I agree that ?T should mean T | null (see microsoft/TypeScript#7426 (comment)), I think that ship has already sailed.

I'm not sure how the Flow team decided ?T should mean T | null | void, but the JavaScript community is so chock-full with disagreement on the purpose of null and undefined that it's probably impossible to change Flow's shorthand now that it's already been implemented.

@nmn
Copy link
Contributor

nmn commented Mar 4, 2017

I don't think this change is worth making anymore as it would probably cause more confusion than good. Further, I don't think bike-shedding over this is going to be productive as you CAN use string | null if that's what you need.

@nmn nmn closed this as completed Mar 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants