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
The following code is fine:
function create<T>(ctor: { new (): T }) { return new ctor(); } class A { } class B<T> extends A { } let b = create(B); // b: B<any> --> OK
But if A is generic, the type is not correct.
class A<T> { } class B<T> extends A<T> { } let b = create(B); // b: A<any> --> Should be B<any>
Sorry if this has already been reported.
The text was updated successfully, but these errors were encountered:
Fixed by #8713.
Sorry, something went wrong.
sandersn
No branches or pull requests
The following code is fine:
But if A is generic, the type is not correct.
Sorry if this has already been reported.
The text was updated successfully, but these errors were encountered: