corehelp wantedtype addition
Repository metrics
- Stars
- (12,328 stars)
- PR merge metrics
- (平均マージ 3d 5h) (30d で 11 merged PRs)
説明
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?