Type Cast or Assertions on the FunctionDeclaration #40378
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
function declaration type cast assertions
Suggestion
A new syntax to cast or assert function declaration as a type T.
Use Cases
In some cases, we want to type-check a function to obey a type constraint but it is not easy to do on the FunctionDeclaration statement.
Examples
Checklist
My suggestion meets these guidelines:
The text was updated successfully, but these errors were encountered: