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

$Shape<T> allows undefined and null values #5884

Closed
mhagmajer opened this issue Feb 27, 2018 · 3 comments
Closed

$Shape<T> allows undefined and null values #5884

mhagmajer opened this issue Feb 27, 2018 · 3 comments

Comments

@mhagmajer
Copy link

/* @flow */

(undefined: $Shape<{}>); // no error
(null: $Shape<{ a: 1 }>); // no error either

I know that $Shape<T> is sort of an undocumented feature, yet I doubt this is expected behaviour.

Checked against 0.66

@mhagmajer mhagmajer changed the title $Shape allows undefined and null values $Shape<T> allows undefined and null values Feb 27, 2018
@AlexanderShushunov
Copy link

v0.85 - still works incorrect.

@AlexanderShushunov
Copy link

AlexanderShushunov commented Nov 8, 2018

Workaround type SaveShape<T> = $Shape<T> & {};
Try Flow

@eilvelia
Copy link

fixed in v0.90.0

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

4 participants