Inferring function parameters from the return type #56311
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
"inferring parameters types", "infer input from output types"
β Viability Checklist
β Suggestion
I would like to infer the types of the parameters of a function based on the return type. I have tried a few patterns and I don't think this is currently possible.
π Motivating Example
π» Use Cases
Helpful for strict typings and intellisense.
None give a strict enough type.
I don't have the type safety that I want.
The text was updated successfully, but these errors were encountered: