I'm writing a function that returns "a function that returns a promise," and I'm struggling to name and document my function.
Is there a name for "a function that returns a Promise"?
Note: "No" is an acceptable answer.
Basically, no. There is not a canonical name for a function that returns a Promise. You can call it whatever you like so long as it is true to the idea that a Promise captures some asynchronous functionality. For example, "an asynchronous function".
However, I would suggest simply using "function that returns a Promise". This is most accurate when you consider that the function itself is not any different for its return value (as @DaveNewton said, the fact it returns a Promise is an implementation detail).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With