-
Notifications
You must be signed in to change notification settings - Fork 12.8k
Separate type application from function application #29043
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
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
Comments
Any hope for this feature? I think it will unblock many other advanced use cases. |
5 tasks
Any hope for a proper solution? Having a generic argument for a mixin function is a very common requirement. |
Checking in to see if this is on the radar |
Please and thank you. |
This was added in TypeScript 4.7 in 2022: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-7.html#instantiation-expressions |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Awaiting More Feedback
This means we'd like to hear from more people who would be helped by this feature
Suggestion
An idea for TypeScript
As discussed in #28931, currently the type application for the function with generic parameters is tied to that function application.
Specialize the value of the function with generics is only possible during the call. So the following compiles fine:
But this does not:
It would be very beneficial to separate type application from function application. For example (the original reason of this request), it will allow mixins with generic parameters:
The text was updated successfully, but these errors were encountered: