Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently
Promise.all
does not seem to properly type tuples containing more than 10 elements. For instance the following snippet is failing in TypeScript 3.9 (except if the user specifiesPromise.all<string|number>
, but the typings would be wrong in that case):This PR suggests a way to properly type tuples containing more than 10 items.
See it in action https://www.typescriptlang.org/play/index.html#code/CYUwxgNghgTiAEkoGdnwLIE8AKMD2AtgJbIIDeAUPNfMgC5R1FjxQQQA8AKmiAB50QAO2Bo4UYHiERM8ANpQhmALrwAPvHGTpsxZjnKAfAAoAbmwCuIZAC54PAJR3chEiA5l5AaXhEh8AGsQTDwAM3tkZTseOS9VfkERNBdiUgAZIiCOP1CQGHgAVUN4AH5C+GjkWNUAX0MKGooKMCl6VngAXgwcfFSQADo2CGM5FLd+uGQ8CFMQYwBGBwAaeDHSCetp2eMAcnoYPwBzHYdlB2bWungAI07utYGhkfmVh42pmbm9ugOhY9Pzi0hG0WF0sG8nnIXvBvr9jmcLsCrsA7uDeuNIaoUKt0aQOEILARrnlDAZAZd4AgwT1XOtMaw0ASiXkyYi2uFqRD2CM3pMtnNFq9cQM+Z9dvsjiclrzNmLBTjaSLZdtYZLljKPtt5Rr+eKfmrpcL3rrtUbRSqJX8pTq5csFX1jWLVVb1WblQK7TaLfqXQimkC2lAHgBBdh3LnDUZuzUeoWKx3euEnBEBq7XENhroR55xh3mr6W-4pilgDMQcNGyHQ53w8lI+DAMsV+P07EPfGE4kwUnF+sgJtZyvcgwM+BMrus1PwUID+0Y4de2Nz9b5vVJ13x1emzfutcGxcLT3R3U163H2258ar08bvO77d3mN7l2GndPh9X3c3hFAA
Fixes #22469
@RyanCavanaugh, it is a follow up for my PR on
Promise.race
#27192 and #31117