Suggestion
🔍 Search Terms
satisfies function
✅ Viability Checklist
⭐ Suggestion
Support the satisfies operator to appear after a function
functionfoo(){}satisfiesBarThis was requested/mentioned in #47920 several times but never followed up on
📃 Motivating Example
satisfies is super handy to use, and you can already use it for arrow functions. Not having support for it on functions feels unintuitive and forces a certain coding style where people have to use arrow functions when they rather want to use functions.
💻 Use Cases
Typing a function while preserving its return type.
Suggestion
🔍 Search Terms
satisfies function
✅ Viability Checklist
⭐ Suggestion
Support the
satisfiesoperator to appear after a functionThis was requested/mentioned in #47920 several times but never followed up on
📃 Motivating Example
satisfiesis super handy to use, and you can already use it for arrow functions. Not having support for it on functions feels unintuitive and forces a certain coding style where people have to use arrow functions when they rather want to use functions.💻 Use Cases
Typing a function while preserving its return type.