Improve typescript.code-snippets for async (#99544)

* Update typescript.code-snippets

* Update typescript.code-snippets

* Update typescript.code-snippets

* Update typescript.code-snippets
This commit is contained in:
Jack Works 2020-08-20 03:07:13 +08:00 committed by GitHub
parent 67243326c1
commit 5d9647d4bc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -167,16 +167,16 @@
"}"
],
"description": "For-Of Loop"
},
"For-Await-Of Loop": {
"prefix": "forawaitof",
"body": [
},
"For-Await-Of Loop": {
"prefix": "forawaitof",
"body": [
"for await (const ${1:iterator} of ${2:object}) {",
"\t$0",
"}"
],
"description": "For-Await-Of Loop"
},
"description": "For-Await-Of Loop"
},
"Function Statement": {
"prefix": "function",
"body": [
@ -278,5 +278,32 @@
"//#endregion"
],
"description": "Folding Region End"
},
"new Promise": {
"prefix": "newpromise",
"body": [
"new Promise<$1:type>((resolve, reject) => {",
"\t$1",
"})"
],
"description": "Create a new Promise"
},
"Async Function Statement": {
"prefix": "async function",
"body": [
"async function ${1:name}(${2:params}:${3:type}) {",
"\t$0",
"}"
],
"description": "Async Function Statement"
},
"Async Function Expression": {
"prefix": "async arrow function",
"body": [
"async (${1:params}:${2:type}) => {",
"\t$0",
"}"
],
"description": "Async Function Expression"
}
}