-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
typeof React.Component
stopped working
#18946
Comments
|
And what about for stateless functions? IE I don't want "a type of subclasses of React.Component", I want "something that will be rendered correctly with React.createElement". |
I guess that depends on what react needs available on such a type -- I'm not familiar with the library so I couldn't tell you. |
why not: function thisTakesAComponent <P>(component: React.SFC<P> | React.ComponentClass<P>) {
} |
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed. |
Not sure if this was applicable when originally asked, but now you can do this: function thisTakesAComponent(component: ReactType) {
} |
TypeScript Version: 2.5.3
Code
Expected behavior:
Should compile fine.
Actual behavior:
The text was updated successfully, but these errors were encountered: