Apply function generics as part of type definition #40542
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
Search Terms
generic typeof functions
Suggestion
The problem is with the code as below:
It would be nice to be able to do something like so:
Use Cases
This would be useful to use with the vriad/zod library, to implement different field validators depending on a parameter, like so:
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: