File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ # Await dictionary
2+ [ Specification] ( https://tc39.es/proposal-await-dictionary/ ) \
3+ [ Proposal repo] ( https://github.com/tc39/proposal-await-dictionary )
4+
5+ ## Modules
6+ [ ` esnext.promise.all-keyed ` ] ( https://github.com/zloirock/core-js/blob/v4/packages/core-js/modules/esnext.promise.all-keyed.js )
7+
8+ ## Built-ins signatures
9+ ``` ts
10+ class Promise {
11+ allKeyed<T extends Record <string , unknown >>(
12+ obj : T
13+ ): Promise <{ [K in keyof T ]: Awaited <T [K ]> }>;
14+ }
15+ ```
16+
17+ ## [ Entry points] ( {docs-version}/docs/usage#h-entry-points )
18+ ``` ts
19+ core - js / proposals / promise - all - keyed
20+ core - js (- pure )/ full / promise / all - keyed
21+ ```
22+
23+ ## Examples
24+ ``` js
25+ await Promise .allKeyed ({
26+ a: Promise .resolve (1 ),
27+ b: Promise .resolve (2 ),
28+ c: 3 ,
29+ }); // => { a: 1, b: 2, c: 3 }
30+ ```
Original file line number Diff line number Diff line change 317317 "title" : " Array deduplication" ,
318318 "url" : " {docs-version}/docs/features/proposals/array-deduplication"
319319 },
320+ {
321+ "title" : " Await dictionary" ,
322+ "url" : " {docs-version}/docs/features/proposals/await-dictionary"
323+ },
320324 {
321325 "title" : " DataView get / set Uint8Clamped methods" ,
322326 "url" : " {docs-version}/docs/features/proposals/dataview-get-set-uint8clamped"
You can’t perform that action at this time.
0 commit comments