Require Node.js 6, add TypeScript definition, update dependencies#4
Require Node.js 6, add TypeScript definition, update dependencies#4sindresorhus merged 2 commits intosindresorhus:masterfrom BendingBender:typescript-defs
Conversation
| Result7, | ||
| Result8, | ||
| Result9, | ||
| Result10 |
There was a problem hiding this comment.
What if there are more than 10 inputs? There must be a better way of achieving this...
There was a problem hiding this comment.
There is a not-so-convenient fallback for any number of parameters:
declare function pAll<TAll>(
tasks: Iterable<PromiseFactory<TAll>> | PromiseFactory<TAll>[],
options?: Options
): Promise<TAll[]>;ATM, TypeScript doesn't have a better way to describe this one.
There was a problem hiding this comment.
Do you know if there's any TS issue for this? Seems like a very big limitation.
There was a problem hiding this comment.
Seems like you've already found it in sindresorhus/p-progress#10, but for anyone else that's reading this there's a related issue in microsoft/TypeScript#5453, which was addressed via variadic tuple types, but unclear whether it solves this yet
Experimental PR to add variadic tuple to Promise.all microsoft/TypeScript#39796
No description provided.