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

$NonMaybeType<mixed> still takes null and undefined #6606

Closed
mrkev opened this issue Jul 17, 2018 · 7 comments
Closed

$NonMaybeType<mixed> still takes null and undefined #6606

mrkev opened this issue Jul 17, 2018 · 7 comments

Comments

@mrkev
Copy link
Contributor

mrkev commented Jul 17, 2018

try flow

This is probably a bug. It would make a good first task. Edit: maybe not.

@motiz88
Copy link
Contributor

motiz88 commented Jul 17, 2018

Could be related: $NonMaybeType<$Shape<T>> likewise still takes null and undefined. Example case

If anyone's curious, there is a workaround in the form of $Shape<T> & Object.

motiz88 added a commit to motiz88/flow that referenced this issue Aug 12, 2018
A couple of remaining issues due to facebook#6606:
- gDSFP's return type is correct, but in need of a cleanup once
$NonMaybeType<$Shape<State>> works.
- gSBU's return type still allows undefined, which should be rejected.

I have made these explicit in the code by using $FIXME-prefixed aliases.
@goodmind goodmind added the good first issue Good for newcomers label Jul 6, 2019
@lucianomlima
Copy link

Still doesn't work with version 105.2.
Try Flow

@goodmind
Copy link
Contributor

goodmind commented Aug 14, 2019

@lucianomlima your example is wrong, $NonMaybeType isn't used for objects
Try Flow

@lucianomlima
Copy link

@goodmind what I can do or use with Objects?

@goodmind
Copy link
Contributor

@lucianomlima for your case Try Flow

@lucianomlima
Copy link

@goodmind Thanks a lot!

@goodmind
Copy link
Contributor

goodmind commented Aug 15, 2019

@mrkev it's actually pretty hard to fix... I didn't knew about ground_subtype function and $NonMaybeType<string> is reverse of ?string type and uses bunch of new use_ts for me ReposUseT and stuff. IDK if this is good first issue 😬

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants