Promise.all
on any
produces Promise<Record<string, any>>
#46169
Labels
Bug
A bug in TypeScript
Fix Available
A PR has been opened for this issue
Fixed
A PR has been merged for this issue
Milestone
Found in a large internal codebase:
Promise.all
always produces anArray
, so this behavior is undesirable.What's happening if you can't tell is that
any
is a valid substitution forT extends unknown[]
. Upon instantiation, we feedany
through a mapped type which acts differently depending on if we've passed in an array or something else.The text was updated successfully, but these errors were encountered: