Skip to content

Commit ece530a

Browse files
authored
Update typescript.code-snippets (microsoft#98521)
1 parent a2bc061 commit ece530a

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

extensions/typescript-basics/snippets/typescript.code-snippets

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
"Throw Exception": {
124124
"prefix": "throw",
125125
"body": [
126-
"throw \"$1\";",
126+
"throw new Error(\"$1\");",
127127
"$0"
128128
],
129129
"description": "Throw Exception"
@@ -167,7 +167,16 @@
167167
"}"
168168
],
169169
"description": "For-Of Loop"
170-
},
170+
},
171+
"For-Await-Of Loop": {
172+
"prefix": "forawaitof",
173+
"body": [
174+
"for await (const ${1:iterator} of ${2:object}) {",
175+
"\t$0",
176+
"}"
177+
],
178+
"description": "For-Await-Of Loop"
179+
},
171180
"Function Statement": {
172181
"prefix": "function",
173182
"body": [

0 commit comments

Comments
 (0)