Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[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
- Loading branch information