function() implements () => unknown {}
#52902
Labels
Duplicate
An existing issue was already created
function() implements () => unknown {}
#52902
Suggestion
π Search Terms
function implements
β Viability Checklist
My suggestion meets these guidelines:
β Suggestion
Allow to add a
implements Type
for a function (not arrow functions). This would allow to easily use a function type on a non-arrow function.π Motivating Example
π» Use Cases
Usually whenever we want to use a function type from a library such as react, we tend to do one of the two things:
This isn't awful to have to deal with but most people prefer using
function
instead of arrow functions whenever declaring a function which is not a call-back for a function. Another problem is that we can't type a function whenever usingexport
.Here is how we currently make and export a function:
or
Here is how it could be done:
The text was updated successfully, but these errors were encountered: