-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Abstract class type argument inference #13087
Comments
This is a really interesting idea. Seems like it would improve life for React users for sure. |
@aluanhaddad I suggested it applied to abstract, mostly because abstract implies there will be at least another declaration. But after thinking about it, I cannot see why it's not applicable to normal classes as well. |
See notes at #13368 |
I hope this covers statics as well, example taken from #10603: abstract class BaseClass<T> {
abstract static defaultValue: T;
// ...
}
class ClassA extends BaseClass {
static defaultValue = {
name: 1;
}
} |
I hope it apply to normal class also. see ant-design/ant-design#4324 |
It would be good if TypeScript can infer the type of an extended class of an generic abstract class:
In a similar fashion, it does inference elsewhere.
The text was updated successfully, but these errors were encountered: