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
E.g. you cannot have an interface and function which satisfy the types:
interface InterfaceA<U> function<U extends InterfaceA<V>>(value: U): U
This means you cannot make generic functions to handle derived types unless you are willing to lose the type information for the return value.
The text was updated successfully, but these errors were encountered:
I don't really understand this one, in the following example :
interface InterfaceA<U> {} declare function myFunc<U extends InterfaceA<any>>(value: U): U ; var b: InterfaceA<string>; var c = myFunc(b);
c is correctly typed to InterfaceA<string>
InterfaceA<string>
did you mean something like that ? :
interface InterfaceA<U> {} declare function myFunc<V, U extends InterfaceA<V>>(value: U): V;
Sorry, something went wrong.
did you mean something like that?
I would expect so, this is something I would want too. See https://j201.github.io/posts/2014-08-30-TypeScript-The-Bad-Parts.html#higher-kinded-types
Fixed by #5949
No branches or pull requests
E.g. you cannot have an interface and function which satisfy the types:
This means you cannot make generic functions to handle derived types unless you are willing to lose the type information for the return value.
The text was updated successfully, but these errors were encountered: