Flow: $NonMaybeType<mixed> still takes `null` and `undefined`

Created on 17 Jul 2018  路  7Comments  路  Source: facebook/flow

try flow

This is probably a bug. ~It would make a good first task.~ _Edit: maybe not._

Has PR destructors bug good first issue

All 7 comments

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.

Still doesn't work with version 105.2.
Try Flow

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

@goodmind what I can do or use with Objects?

@lucianomlima for your case Try Flow

@goodmind Thanks a lot!

@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 馃槵

Was this page helpful?
0 / 5 - 0 ratings