To make it easier to constrain a type to be an async function. We can currently do T extends Function
, but there's no way to enforce it to be async.
We already have an internal type for this:
But I'm thinking it could be more reusable:
type AsyncFunction<Arguments extends readonly any[] = readonly any[], ReturnValue = unknown> = (...arguments_: Arguments) => Promise<ReturnValue>;
Thoughts?
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too