-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Cannot use 'this' type in type argument on base types #7289
Comments
The class is by design, as the type parameter could be used in the constructor. but the interface seems reasonable. |
Can you elaborate what you mean? I'm not necessarily seeing the issue in that case. |
Related to #6223. While subtly different, I suspect they are in the same problem space. |
Well...we could use it for Mithril.js types, where we were looking to add class support. We could avoid creating an entire boilerplate type by just allowing (Oh, and this would also help quite a bit from the other end.) |
Seems to not be a very popular scenario |
These examples have an error on the 'this' type argument of
Foo
:Since an object type cannot reference a type parameter directly within a heritage clause, we shouldn't be giving this error.
The text was updated successfully, but these errors were encountered: