Created
January 14, 2022 10:31
-
-
Save holgergp/ebb95109ecb8dedb7d5eb828a86fb8e4 to your computer and use it in GitHub Desktop.
Promise.all() (TypeScript 4.5 article)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const result = await Promise.all([Promise.resolve(10), Promise.resolve(20)]); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all<T1, T2>(values: readonly [T1 | PromiseLike<T1>, T2 | PromiseLike<T2>]): Promise<[T1, T2]>; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all<T>(values: Iterable<T | PromiseLike<T>>): Promise<Awaited<T>[]>; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment