Skip to content

Commit 2aa1031

Browse files
slowcheetahzloirock
authored andcommitted
Await dictionary docs
1 parent f21005e commit 2aa1031

File tree

2 files changed

+34
-0
lines changed

2 files changed

+34
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
```

docs/web/docs/menu.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,10 @@
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"

0 commit comments

Comments
 (0)