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: master at a633652 (Sep 27, 2016)
Code
interface Fun<T> { (value: T) } function switcheroo<T>(component: Fun<T>): Fun<T> { return component } function MyComponent(value: string) { return { type: OtherComponent } } export const OtherComponent = switcheroo(MyComponent)
Expected behavior:
Expected type of MyComponent to be (value: string) => {type: Fun<string>} and type of OtherComponent to be Fun<string>
MyComponent
(value: string) => {type: Fun<string>}
OtherComponent
Fun<string>
Actual behavior: Both types are any.
any
This is likely related or caused by the same thing as #5487 but I thought I'd contribute another test case.
The text was updated successfully, but these errors were encountered:
See #10978
Sorry, something went wrong.
No branches or pull requests
TypeScript Version: master at a633652 (Sep 27, 2016)
Code
Expected behavior:
Expected type of
MyComponent
to be(value: string) => {type: Fun<string>}
and type ofOtherComponent
to beFun<string>
Actual behavior:
Both types are
any
.This is likely related or caused by the same thing as #5487 but I thought I'd contribute another test case.
The text was updated successfully, but these errors were encountered: