Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 5d32051

Browse files
committed
feat: Add Promise.{allSettled,any}.
1 parent 7bd3e30 commit 5d32051

File tree

3 files changed

+25
-7
lines changed

3 files changed

+25
-7
lines changed

‎README.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -102,13 +102,15 @@ Install from VSCode Extension Marketplace [Hyper JavaScript Snippets](https://ma
102102
| `iof` | instanceof | `${1:source} instanceof ${0:Class}` |
103103

104104
### Promises
105-
| Prefix | Desc | Body |
106-
| -----: | ------------------------- | --------------------------- |
107-
| `pr` | Promise (ES2015) | `new Promise(${0})` |
108-
| `prs` | Promise resolve (ES2015) | `Promise.resolve(${1})${0}` |
109-
| `prj` | Promise reject (ES2015) | `Promise.reject(${1})${0}` |
110-
| `pra` | Promise all (ES2015) | `Promise.all(${1})${0}` |
111-
| `prt` | Promise type (TypeScript) | `Promise<${0}>` |
105+
| Prefix | Desc | Body |
106+
| -----: | ---------------------------- | ------------------------------ |
107+
| `pr` | Promise (ES2015) | `new Promise(${0})` |
108+
| `prs` | Promise resolve (ES2015) | `Promise.resolve(${1})${0}` |
109+
| `prj` | Promise reject (ES2015) | `Promise.reject(${1})${0}` |
110+
| `pra` | Promise all (ES2015) | `Promise.all(${1})${0}` |
111+
| `pras` | Promise all settled (ES2020) | `Promise.allSettled(${1})${0}` |
112+
| `pran` | Promise any (ES2021) | `Promise.any(${1})${0}` |
113+
| `prt` | Promise type (TypeScript) | `Promise<${0}>` |
112114

113115
### ES2015 Modules
114116
| Prefix | Desc | Body |

‎snippets/javascript.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,14 @@
175175
"prefix": "pra",
176176
"body": "Promise.all(${1})${0}"
177177
},
178+
"Promise all settled (ES2020)": {
179+
"prefix": "pras",
180+
"body": "Promise.allSettled(${1})${0}"
181+
},
182+
"Promise any (ES2021)": {
183+
"prefix": "pran",
184+
"body": "Promise.any(${1})${0}"
185+
},
178186

179187
"export (ES2015)": {
180188
"prefix": "exp",

‎snippets/typescript.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,14 @@
179179
"prefix": "pra",
180180
"body": "Promise.all(${1})${0}"
181181
},
182+
"Promise all settled (ES2020)": {
183+
"prefix": "pras",
184+
"body": "Promise.allSettled(${1})${0}"
185+
},
186+
"Promise any (ES2021)": {
187+
"prefix": "pran",
188+
"body": "Promise.any(${1})${0}"
189+
},
182190
"Promise type (TypeScript)": {
183191
"prefix": "prt",
184192
"body": "Promise<${0}>"

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /