We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
TypeScript Version:
1.8.10
Code
function decorator<P>() { return (component: React.ComponentClass<P>) => { return component; } } class Foo extends React.Component<any, any> { } export const WrappedFoo = decorator()(Foo); // Works @decorator() class Foo extends React.Component<any, any> { } // Fails error TS1238: Unable to resolve signature of class decorator when called as an expression. Type 'ComponentClass<{}>' is not assignable to type 'void'.
Also specifying P gives a similar error:
P
@decorator<FooProps>() class Foo extends React.Component<FooProps, any> { } error TS1238: Unable to resolve signature of class decorator when called as an expression. Type 'ComponentClass<FooProps>' is not assignable to type 'void'.
I've been banging my head against this for a couple hours now. Maybe I'm missing something? It seems pretty straight forward though.
The text was updated successfully, but these errors were encountered:
I can not get this to reproduce locally with latest typescript@next and latest definition on definitely typed.
typescript@next
Sorry, something went wrong.
Looks like #9365 and this issue are about the same problem. i would like to keep one to track this, so closing in favor of #9365
No branches or pull requests
TypeScript Version:
1.8.10
Code
Also specifying
P
gives a similar error:I've been banging my head against this for a couple hours now. Maybe I'm missing something? It seems pretty straight forward though.
The text was updated successfully, but these errors were encountered: