You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[flow] Relax component type instance subtyping rule
Summary:
This diff relaxes the component type instance subtyping rule to further align with ref-as-prop model. Specifically, `React.ComponentType<{}> ~> component()` will be allowed, and ideally `component() ~> React.ComponentType<{}>` should be banned (but not yet for compatibility reasons for now, since we need to accept things like `fn component without ref prop ~> React.ComponentType<{}>` which is allowed forever) for the reason described in the comments.
Changelog: [fixed] We now allow something of type `React.ComponentType<{}>` to be a subtype of `component()`
Reviewed By: jbrown215
Differential Revision: D69542576
fbshipit-source-id: d6265f683b130df15c2d05214cf15fb8395b6c61
0 commit comments