@codingame/monaco-editor-wrapper 1.4.3 → 1.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/COBOL Copybook2.js +2017 -0
- package/dist/COBOL2.js +2017 -0
- package/dist/JavaScript.tmLanguage.js +0 -49
- package/dist/JavaScriptReact.tmLanguage.js +0 -49
- package/dist/SQL.plist.js +482 -0
- package/dist/TypeScript.tmLanguage.js +0 -49
- package/dist/TypeScriptReact.tmLanguage.js +0 -49
- package/dist/bsv2.js +49 -0
- package/dist/c2.js +18 -0
- package/dist/cobol-snippets.js +2017 -0
- package/dist/codeblock3.js +18 -18
- package/dist/coffeescript-coffeescript.code-snippets.js +18 -0
- package/dist/coffeescript2.js +18 -0
- package/dist/configuration/hack.d.ts +2 -0
- package/dist/cpp-c.code-snippets.js +18 -0
- package/dist/cpp-cpp.code-snippets.js +18 -0
- package/dist/cpp2.js +18 -0
- package/dist/cpptools.js +7 -1
- package/dist/csharp2.js +508 -0
- package/dist/css.worker.js +1 -1
- package/dist/cssContribution.js +10 -0
- package/dist/diet3.js +92 -0
- package/dist/elixir-snippets.js +184 -0
- package/dist/extensionConfigurations.js +9475 -0
- package/dist/features/extensionConfigurations.js +3 -3
- package/dist/fsharp-fsharp.code-snippets.js +18 -0
- package/dist/fsharp2.js +18 -0
- package/dist/groovy-groovy.code-snippets.js +229 -0
- package/dist/groovy2.js +229 -0
- package/dist/hacks.d.ts +2 -1
- package/dist/html (eex).js +31 -0
- package/dist/html.worker.js +1 -1
- package/dist/htmlContribution.js +10 -0
- package/dist/index.d.ts +2 -2
- package/dist/java-java.js +4 -1
- package/dist/java.js +11 -0
- package/dist/java2.js +3 -2
- package/dist/javascript-javascript.code-snippets.js +196 -0
- package/dist/javascript2.js +196 -0
- package/dist/javascriptreact2.js +196 -0
- package/dist/json.worker.js +1 -1
- package/dist/jsonContribution.js +78 -0
- package/dist/keybindings/index.d.ts +2 -1
- package/dist/keybindings/keybindingHelper.d.ts +1 -1
- package/dist/kotlin2.js +117 -0
- package/dist/kotlinscript2.js +117 -0
- package/dist/languages/extensions/configurationLoader.d.ts +1306 -0
- package/dist/languages/extensions/languageConfigurationLoader.d.ts +9 -1
- package/dist/languages/monarch/list.d.ts +7 -0
- package/dist/languages/textMate/CGTMTokenizationSupport.d.ts +2 -2
- package/dist/languages/textMate/TextMateTokensProvider.d.ts +11 -0
- package/dist/lua2.js +35 -0
- package/dist/main.js +186 -232
- package/dist/markdown-basics-markdown.code-snippets.js +121 -0
- package/dist/markdown-basics.js +103 -0
- package/dist/markdown2.js +103 -0
- package/dist/monaco.d.ts +0 -1
- package/dist/pgsql-sql.js +21 -0
- package/dist/pgsql.js +21 -0
- package/dist/php-php.code-snippets.js +265 -0
- package/dist/php2.js +265 -0
- package/dist/powershell-powershell.code-snippets.js +18 -0
- package/dist/powershell2.js +18 -0
- package/dist/r.tmLanguage.js +572 -0
- package/dist/r2.js +1 -1
- package/dist/reason2.js +100 -0
- package/dist/scalameta.js +12 -1
- package/dist/services/MultiEditorStandaloneCodeEditorService.d.ts +3 -3
- package/dist/services/TextModelService.d.ts +25 -0
- package/dist/services/functional.d.ts +1 -0
- package/dist/services/lyfecycle.d.ts +13 -0
- package/dist/sql2.js +21 -0
- package/dist/svlangserver-systemverilog.js +395 -0
- package/dist/svlangserver.js +85 -0
- package/dist/swift-swift.code-snippets.js +183 -0
- package/dist/swift2.js +183 -0
- package/dist/systemverilog.js +41 -7
- package/dist/systemverilog.tmLanguage.js +676 -496
- package/dist/systemverilog2.js +208 -0
- package/dist/tcl2.js +151 -0
- package/dist/theme/tools.d.ts +2 -1
- package/dist/ts.worker.js +1 -1
- package/dist/typescript-basics-typescript.code-snippets.js +312 -0
- package/dist/typescript-basics.js +312 -0
- package/dist/typescript-language-features.js +14 -4
- package/dist/typescript2.js +312 -0
- package/dist/typescriptContribution.js +36 -0
- package/dist/typescriptreact2.js +312 -0
- package/dist/vb-vb.code-snippets.js +88 -0
- package/dist/vb2.js +88 -0
- package/dist/verilog-systemverilog.js +327 -140
- package/dist/verilog.js +85 -3
- package/dist/verilog2.js +56 -65
- package/dist/vscode-R-r-snippets.js +534 -0
- package/dist/vscode-R-rmarkdown.js +91 -0
- package/dist/vscode-python.js +9 -0
- package/dist/worker.js +1 -1
- package/package.json +18 -14
- package/stats.html +1 -1
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
var Constructor = {
|
|
2
|
+
prefix: "ctor",
|
|
3
|
+
body: [
|
|
4
|
+
"/**",
|
|
5
|
+
" *",
|
|
6
|
+
" */",
|
|
7
|
+
"constructor() {",
|
|
8
|
+
"\tsuper();",
|
|
9
|
+
"\t$0",
|
|
10
|
+
"}"
|
|
11
|
+
],
|
|
12
|
+
description: "Constructor"
|
|
13
|
+
};
|
|
14
|
+
var typescriptBasicsTypescript_codeSnippets = {
|
|
15
|
+
Constructor: Constructor,
|
|
16
|
+
"Class Definition": {
|
|
17
|
+
prefix: "class",
|
|
18
|
+
body: [
|
|
19
|
+
"class ${1:name} {",
|
|
20
|
+
"\tconstructor(${2:parameters}) {",
|
|
21
|
+
"\t\t$0",
|
|
22
|
+
"\t}",
|
|
23
|
+
"}"
|
|
24
|
+
],
|
|
25
|
+
description: "Class Definition"
|
|
26
|
+
},
|
|
27
|
+
"Public Method Definition": {
|
|
28
|
+
prefix: "public method",
|
|
29
|
+
body: [
|
|
30
|
+
"/**",
|
|
31
|
+
" * ${1:name}",
|
|
32
|
+
" */",
|
|
33
|
+
"public ${1:name}() {",
|
|
34
|
+
"\t$0",
|
|
35
|
+
"}"
|
|
36
|
+
],
|
|
37
|
+
description: "Public Method Definition"
|
|
38
|
+
},
|
|
39
|
+
"Private Method Definition": {
|
|
40
|
+
prefix: "private method",
|
|
41
|
+
body: [
|
|
42
|
+
"private ${1:name}() {",
|
|
43
|
+
"\t$0",
|
|
44
|
+
"}"
|
|
45
|
+
],
|
|
46
|
+
description: "Private Method Definition"
|
|
47
|
+
},
|
|
48
|
+
"Import external module.": {
|
|
49
|
+
prefix: "import statement",
|
|
50
|
+
body: [
|
|
51
|
+
"import { $0 } from \"${1:module}\";"
|
|
52
|
+
],
|
|
53
|
+
description: "Import external module."
|
|
54
|
+
},
|
|
55
|
+
"Property getter": {
|
|
56
|
+
prefix: "get",
|
|
57
|
+
body: [
|
|
58
|
+
"",
|
|
59
|
+
"public get ${1:value}() : ${2:string} {",
|
|
60
|
+
"\t${3:return $0}",
|
|
61
|
+
"}",
|
|
62
|
+
""
|
|
63
|
+
],
|
|
64
|
+
description: "Property getter"
|
|
65
|
+
},
|
|
66
|
+
"Log to the console": {
|
|
67
|
+
prefix: "log",
|
|
68
|
+
body: [
|
|
69
|
+
"console.log($1);",
|
|
70
|
+
"$0"
|
|
71
|
+
],
|
|
72
|
+
description: "Log to the console"
|
|
73
|
+
},
|
|
74
|
+
"Log warning to console": {
|
|
75
|
+
prefix: "warn",
|
|
76
|
+
body: [
|
|
77
|
+
"console.warn($1);",
|
|
78
|
+
"$0"
|
|
79
|
+
],
|
|
80
|
+
description: "Log warning to the console"
|
|
81
|
+
},
|
|
82
|
+
"Log error to console": {
|
|
83
|
+
prefix: "error",
|
|
84
|
+
body: [
|
|
85
|
+
"console.error($1);",
|
|
86
|
+
"$0"
|
|
87
|
+
],
|
|
88
|
+
description: "Log error to the console"
|
|
89
|
+
},
|
|
90
|
+
"Define a full property": {
|
|
91
|
+
prefix: "prop",
|
|
92
|
+
body: [
|
|
93
|
+
"",
|
|
94
|
+
"private _${1:value} : ${2:string};",
|
|
95
|
+
"public get ${1:value}() : ${2:string} {",
|
|
96
|
+
"\treturn this._${1:value};",
|
|
97
|
+
"}",
|
|
98
|
+
"public set ${1:value}(v : ${2:string}) {",
|
|
99
|
+
"\tthis._${1:value} = v;",
|
|
100
|
+
"}",
|
|
101
|
+
""
|
|
102
|
+
],
|
|
103
|
+
description: "Define a full property"
|
|
104
|
+
},
|
|
105
|
+
"Triple-slash reference": {
|
|
106
|
+
prefix: "ref",
|
|
107
|
+
body: [
|
|
108
|
+
"/// <reference path=\"$1\" />",
|
|
109
|
+
"$0"
|
|
110
|
+
],
|
|
111
|
+
description: "Triple-slash reference"
|
|
112
|
+
},
|
|
113
|
+
"Property setter": {
|
|
114
|
+
prefix: "set",
|
|
115
|
+
body: [
|
|
116
|
+
"",
|
|
117
|
+
"public set ${1:value}(v : ${2:string}) {",
|
|
118
|
+
"\tthis.$3 = v;",
|
|
119
|
+
"}",
|
|
120
|
+
""
|
|
121
|
+
],
|
|
122
|
+
description: "Property setter"
|
|
123
|
+
},
|
|
124
|
+
"Throw Exception": {
|
|
125
|
+
prefix: "throw",
|
|
126
|
+
body: [
|
|
127
|
+
"throw new Error(\"$1\");",
|
|
128
|
+
"$0"
|
|
129
|
+
],
|
|
130
|
+
description: "Throw Exception"
|
|
131
|
+
},
|
|
132
|
+
"For Loop": {
|
|
133
|
+
prefix: "for",
|
|
134
|
+
body: [
|
|
135
|
+
"for (let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
|
|
136
|
+
"\tconst ${3:element} = ${2:array}[${1:index}];",
|
|
137
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
138
|
+
"}"
|
|
139
|
+
],
|
|
140
|
+
description: "For Loop"
|
|
141
|
+
},
|
|
142
|
+
"For-Each Loop using =>": {
|
|
143
|
+
prefix: "foreach =>",
|
|
144
|
+
body: [
|
|
145
|
+
"${1:array}.forEach(${2:element} => {",
|
|
146
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
147
|
+
"});"
|
|
148
|
+
],
|
|
149
|
+
description: "For-Each Loop using =>"
|
|
150
|
+
},
|
|
151
|
+
"For-In Loop": {
|
|
152
|
+
prefix: "forin",
|
|
153
|
+
body: [
|
|
154
|
+
"for (const ${1:key} in ${2:object}) {",
|
|
155
|
+
"\tif (Object.prototype.hasOwnProperty.call(${2:object}, ${1:key})) {",
|
|
156
|
+
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
|
|
157
|
+
"\t\t$TM_SELECTED_TEXT$0",
|
|
158
|
+
"\t}",
|
|
159
|
+
"}"
|
|
160
|
+
],
|
|
161
|
+
description: "For-In Loop"
|
|
162
|
+
},
|
|
163
|
+
"For-Of Loop": {
|
|
164
|
+
prefix: "forof",
|
|
165
|
+
body: [
|
|
166
|
+
"for (const ${1:iterator} of ${2:object}) {",
|
|
167
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
168
|
+
"}"
|
|
169
|
+
],
|
|
170
|
+
description: "For-Of Loop"
|
|
171
|
+
},
|
|
172
|
+
"For-Await-Of Loop": {
|
|
173
|
+
prefix: "forawaitof",
|
|
174
|
+
body: [
|
|
175
|
+
"for await (const ${1:iterator} of ${2:object}) {",
|
|
176
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
177
|
+
"}"
|
|
178
|
+
],
|
|
179
|
+
description: "For-Await-Of Loop"
|
|
180
|
+
},
|
|
181
|
+
"Function Statement": {
|
|
182
|
+
prefix: "function",
|
|
183
|
+
body: [
|
|
184
|
+
"function ${1:name}(${2:params}:${3:type}) {",
|
|
185
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
186
|
+
"}"
|
|
187
|
+
],
|
|
188
|
+
description: "Function Statement"
|
|
189
|
+
},
|
|
190
|
+
"If Statement": {
|
|
191
|
+
prefix: "if",
|
|
192
|
+
body: [
|
|
193
|
+
"if (${1:condition}) {",
|
|
194
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
195
|
+
"}"
|
|
196
|
+
],
|
|
197
|
+
description: "If Statement"
|
|
198
|
+
},
|
|
199
|
+
"If-Else Statement": {
|
|
200
|
+
prefix: "ifelse",
|
|
201
|
+
body: [
|
|
202
|
+
"if (${1:condition}) {",
|
|
203
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
204
|
+
"} else {",
|
|
205
|
+
"\t",
|
|
206
|
+
"}"
|
|
207
|
+
],
|
|
208
|
+
description: "If-Else Statement"
|
|
209
|
+
},
|
|
210
|
+
"New Statement": {
|
|
211
|
+
prefix: "new",
|
|
212
|
+
body: [
|
|
213
|
+
"const ${1:name} = new ${2:type}(${3:arguments});$0"
|
|
214
|
+
],
|
|
215
|
+
description: "New Statement"
|
|
216
|
+
},
|
|
217
|
+
"Switch Statement": {
|
|
218
|
+
prefix: "switch",
|
|
219
|
+
body: [
|
|
220
|
+
"switch (${1:key}) {",
|
|
221
|
+
"\tcase ${2:value}:",
|
|
222
|
+
"\t\t$0",
|
|
223
|
+
"\t\tbreak;",
|
|
224
|
+
"",
|
|
225
|
+
"\tdefault:",
|
|
226
|
+
"\t\tbreak;",
|
|
227
|
+
"}"
|
|
228
|
+
],
|
|
229
|
+
description: "Switch Statement"
|
|
230
|
+
},
|
|
231
|
+
"While Statement": {
|
|
232
|
+
prefix: "while",
|
|
233
|
+
body: [
|
|
234
|
+
"while (${1:condition}) {",
|
|
235
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
236
|
+
"}"
|
|
237
|
+
],
|
|
238
|
+
description: "While Statement"
|
|
239
|
+
},
|
|
240
|
+
"Do-While Statement": {
|
|
241
|
+
prefix: "dowhile",
|
|
242
|
+
body: [
|
|
243
|
+
"do {",
|
|
244
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
245
|
+
"} while (${1:condition});"
|
|
246
|
+
],
|
|
247
|
+
description: "Do-While Statement"
|
|
248
|
+
},
|
|
249
|
+
"Try-Catch Statement": {
|
|
250
|
+
prefix: "trycatch",
|
|
251
|
+
body: [
|
|
252
|
+
"try {",
|
|
253
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
254
|
+
"} catch (${1:error}) {",
|
|
255
|
+
"\t",
|
|
256
|
+
"}"
|
|
257
|
+
],
|
|
258
|
+
description: "Try-Catch Statement"
|
|
259
|
+
},
|
|
260
|
+
"Set Timeout Function": {
|
|
261
|
+
prefix: "settimeout",
|
|
262
|
+
body: [
|
|
263
|
+
"setTimeout(() => {",
|
|
264
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
265
|
+
"}, ${1:timeout});"
|
|
266
|
+
],
|
|
267
|
+
description: "Set Timeout Function"
|
|
268
|
+
},
|
|
269
|
+
"Region Start": {
|
|
270
|
+
prefix: "#region",
|
|
271
|
+
body: [
|
|
272
|
+
"//#region $0"
|
|
273
|
+
],
|
|
274
|
+
description: "Folding Region Start"
|
|
275
|
+
},
|
|
276
|
+
"Region End": {
|
|
277
|
+
prefix: "#endregion",
|
|
278
|
+
body: [
|
|
279
|
+
"//#endregion"
|
|
280
|
+
],
|
|
281
|
+
description: "Folding Region End"
|
|
282
|
+
},
|
|
283
|
+
"new Promise": {
|
|
284
|
+
prefix: "newpromise",
|
|
285
|
+
body: [
|
|
286
|
+
"new Promise<${1:void}>((resolve, reject) => {",
|
|
287
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
288
|
+
"})"
|
|
289
|
+
],
|
|
290
|
+
description: "Create a new Promise"
|
|
291
|
+
},
|
|
292
|
+
"Async Function Statement": {
|
|
293
|
+
prefix: "async function",
|
|
294
|
+
body: [
|
|
295
|
+
"async function ${1:name}(${2:params}:${3:type}) {",
|
|
296
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
297
|
+
"}"
|
|
298
|
+
],
|
|
299
|
+
description: "Async Function Statement"
|
|
300
|
+
},
|
|
301
|
+
"Async Function Expression": {
|
|
302
|
+
prefix: "async arrow function",
|
|
303
|
+
body: [
|
|
304
|
+
"async (${1:params}:${2:type}) => {",
|
|
305
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
306
|
+
"}"
|
|
307
|
+
],
|
|
308
|
+
description: "Async Function Expression"
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
export { Constructor, typescriptBasicsTypescript_codeSnippets as default };
|
|
@@ -0,0 +1,312 @@
|
|
|
1
|
+
var Constructor = {
|
|
2
|
+
prefix: "ctor",
|
|
3
|
+
body: [
|
|
4
|
+
"/**",
|
|
5
|
+
" *",
|
|
6
|
+
" */",
|
|
7
|
+
"constructor() {",
|
|
8
|
+
"\tsuper();",
|
|
9
|
+
"\t$0",
|
|
10
|
+
"}"
|
|
11
|
+
],
|
|
12
|
+
description: "Constructor"
|
|
13
|
+
};
|
|
14
|
+
var typescriptBasics = {
|
|
15
|
+
Constructor: Constructor,
|
|
16
|
+
"Class Definition": {
|
|
17
|
+
prefix: "class",
|
|
18
|
+
body: [
|
|
19
|
+
"class ${1:name} {",
|
|
20
|
+
"\tconstructor(${2:parameters}) {",
|
|
21
|
+
"\t\t$0",
|
|
22
|
+
"\t}",
|
|
23
|
+
"}"
|
|
24
|
+
],
|
|
25
|
+
description: "Class Definition"
|
|
26
|
+
},
|
|
27
|
+
"Public Method Definition": {
|
|
28
|
+
prefix: "public method",
|
|
29
|
+
body: [
|
|
30
|
+
"/**",
|
|
31
|
+
" * ${1:name}",
|
|
32
|
+
" */",
|
|
33
|
+
"public ${1:name}() {",
|
|
34
|
+
"\t$0",
|
|
35
|
+
"}"
|
|
36
|
+
],
|
|
37
|
+
description: "Public Method Definition"
|
|
38
|
+
},
|
|
39
|
+
"Private Method Definition": {
|
|
40
|
+
prefix: "private method",
|
|
41
|
+
body: [
|
|
42
|
+
"private ${1:name}() {",
|
|
43
|
+
"\t$0",
|
|
44
|
+
"}"
|
|
45
|
+
],
|
|
46
|
+
description: "Private Method Definition"
|
|
47
|
+
},
|
|
48
|
+
"Import external module.": {
|
|
49
|
+
prefix: "import statement",
|
|
50
|
+
body: [
|
|
51
|
+
"import { $0 } from \"${1:module}\";"
|
|
52
|
+
],
|
|
53
|
+
description: "Import external module."
|
|
54
|
+
},
|
|
55
|
+
"Property getter": {
|
|
56
|
+
prefix: "get",
|
|
57
|
+
body: [
|
|
58
|
+
"",
|
|
59
|
+
"public get ${1:value}() : ${2:string} {",
|
|
60
|
+
"\t${3:return $0}",
|
|
61
|
+
"}",
|
|
62
|
+
""
|
|
63
|
+
],
|
|
64
|
+
description: "Property getter"
|
|
65
|
+
},
|
|
66
|
+
"Log to the console": {
|
|
67
|
+
prefix: "log",
|
|
68
|
+
body: [
|
|
69
|
+
"console.log($1);",
|
|
70
|
+
"$0"
|
|
71
|
+
],
|
|
72
|
+
description: "Log to the console"
|
|
73
|
+
},
|
|
74
|
+
"Log warning to console": {
|
|
75
|
+
prefix: "warn",
|
|
76
|
+
body: [
|
|
77
|
+
"console.warn($1);",
|
|
78
|
+
"$0"
|
|
79
|
+
],
|
|
80
|
+
description: "Log warning to the console"
|
|
81
|
+
},
|
|
82
|
+
"Log error to console": {
|
|
83
|
+
prefix: "error",
|
|
84
|
+
body: [
|
|
85
|
+
"console.error($1);",
|
|
86
|
+
"$0"
|
|
87
|
+
],
|
|
88
|
+
description: "Log error to the console"
|
|
89
|
+
},
|
|
90
|
+
"Define a full property": {
|
|
91
|
+
prefix: "prop",
|
|
92
|
+
body: [
|
|
93
|
+
"",
|
|
94
|
+
"private _${1:value} : ${2:string};",
|
|
95
|
+
"public get ${1:value}() : ${2:string} {",
|
|
96
|
+
"\treturn this._${1:value};",
|
|
97
|
+
"}",
|
|
98
|
+
"public set ${1:value}(v : ${2:string}) {",
|
|
99
|
+
"\tthis._${1:value} = v;",
|
|
100
|
+
"}",
|
|
101
|
+
""
|
|
102
|
+
],
|
|
103
|
+
description: "Define a full property"
|
|
104
|
+
},
|
|
105
|
+
"Triple-slash reference": {
|
|
106
|
+
prefix: "ref",
|
|
107
|
+
body: [
|
|
108
|
+
"/// <reference path=\"$1\" />",
|
|
109
|
+
"$0"
|
|
110
|
+
],
|
|
111
|
+
description: "Triple-slash reference"
|
|
112
|
+
},
|
|
113
|
+
"Property setter": {
|
|
114
|
+
prefix: "set",
|
|
115
|
+
body: [
|
|
116
|
+
"",
|
|
117
|
+
"public set ${1:value}(v : ${2:string}) {",
|
|
118
|
+
"\tthis.$3 = v;",
|
|
119
|
+
"}",
|
|
120
|
+
""
|
|
121
|
+
],
|
|
122
|
+
description: "Property setter"
|
|
123
|
+
},
|
|
124
|
+
"Throw Exception": {
|
|
125
|
+
prefix: "throw",
|
|
126
|
+
body: [
|
|
127
|
+
"throw new Error(\"$1\");",
|
|
128
|
+
"$0"
|
|
129
|
+
],
|
|
130
|
+
description: "Throw Exception"
|
|
131
|
+
},
|
|
132
|
+
"For Loop": {
|
|
133
|
+
prefix: "for",
|
|
134
|
+
body: [
|
|
135
|
+
"for (let ${1:index} = 0; ${1:index} < ${2:array}.length; ${1:index}++) {",
|
|
136
|
+
"\tconst ${3:element} = ${2:array}[${1:index}];",
|
|
137
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
138
|
+
"}"
|
|
139
|
+
],
|
|
140
|
+
description: "For Loop"
|
|
141
|
+
},
|
|
142
|
+
"For-Each Loop using =>": {
|
|
143
|
+
prefix: "foreach =>",
|
|
144
|
+
body: [
|
|
145
|
+
"${1:array}.forEach(${2:element} => {",
|
|
146
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
147
|
+
"});"
|
|
148
|
+
],
|
|
149
|
+
description: "For-Each Loop using =>"
|
|
150
|
+
},
|
|
151
|
+
"For-In Loop": {
|
|
152
|
+
prefix: "forin",
|
|
153
|
+
body: [
|
|
154
|
+
"for (const ${1:key} in ${2:object}) {",
|
|
155
|
+
"\tif (Object.prototype.hasOwnProperty.call(${2:object}, ${1:key})) {",
|
|
156
|
+
"\t\tconst ${3:element} = ${2:object}[${1:key}];",
|
|
157
|
+
"\t\t$TM_SELECTED_TEXT$0",
|
|
158
|
+
"\t}",
|
|
159
|
+
"}"
|
|
160
|
+
],
|
|
161
|
+
description: "For-In Loop"
|
|
162
|
+
},
|
|
163
|
+
"For-Of Loop": {
|
|
164
|
+
prefix: "forof",
|
|
165
|
+
body: [
|
|
166
|
+
"for (const ${1:iterator} of ${2:object}) {",
|
|
167
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
168
|
+
"}"
|
|
169
|
+
],
|
|
170
|
+
description: "For-Of Loop"
|
|
171
|
+
},
|
|
172
|
+
"For-Await-Of Loop": {
|
|
173
|
+
prefix: "forawaitof",
|
|
174
|
+
body: [
|
|
175
|
+
"for await (const ${1:iterator} of ${2:object}) {",
|
|
176
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
177
|
+
"}"
|
|
178
|
+
],
|
|
179
|
+
description: "For-Await-Of Loop"
|
|
180
|
+
},
|
|
181
|
+
"Function Statement": {
|
|
182
|
+
prefix: "function",
|
|
183
|
+
body: [
|
|
184
|
+
"function ${1:name}(${2:params}:${3:type}) {",
|
|
185
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
186
|
+
"}"
|
|
187
|
+
],
|
|
188
|
+
description: "Function Statement"
|
|
189
|
+
},
|
|
190
|
+
"If Statement": {
|
|
191
|
+
prefix: "if",
|
|
192
|
+
body: [
|
|
193
|
+
"if (${1:condition}) {",
|
|
194
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
195
|
+
"}"
|
|
196
|
+
],
|
|
197
|
+
description: "If Statement"
|
|
198
|
+
},
|
|
199
|
+
"If-Else Statement": {
|
|
200
|
+
prefix: "ifelse",
|
|
201
|
+
body: [
|
|
202
|
+
"if (${1:condition}) {",
|
|
203
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
204
|
+
"} else {",
|
|
205
|
+
"\t",
|
|
206
|
+
"}"
|
|
207
|
+
],
|
|
208
|
+
description: "If-Else Statement"
|
|
209
|
+
},
|
|
210
|
+
"New Statement": {
|
|
211
|
+
prefix: "new",
|
|
212
|
+
body: [
|
|
213
|
+
"const ${1:name} = new ${2:type}(${3:arguments});$0"
|
|
214
|
+
],
|
|
215
|
+
description: "New Statement"
|
|
216
|
+
},
|
|
217
|
+
"Switch Statement": {
|
|
218
|
+
prefix: "switch",
|
|
219
|
+
body: [
|
|
220
|
+
"switch (${1:key}) {",
|
|
221
|
+
"\tcase ${2:value}:",
|
|
222
|
+
"\t\t$0",
|
|
223
|
+
"\t\tbreak;",
|
|
224
|
+
"",
|
|
225
|
+
"\tdefault:",
|
|
226
|
+
"\t\tbreak;",
|
|
227
|
+
"}"
|
|
228
|
+
],
|
|
229
|
+
description: "Switch Statement"
|
|
230
|
+
},
|
|
231
|
+
"While Statement": {
|
|
232
|
+
prefix: "while",
|
|
233
|
+
body: [
|
|
234
|
+
"while (${1:condition}) {",
|
|
235
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
236
|
+
"}"
|
|
237
|
+
],
|
|
238
|
+
description: "While Statement"
|
|
239
|
+
},
|
|
240
|
+
"Do-While Statement": {
|
|
241
|
+
prefix: "dowhile",
|
|
242
|
+
body: [
|
|
243
|
+
"do {",
|
|
244
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
245
|
+
"} while (${1:condition});"
|
|
246
|
+
],
|
|
247
|
+
description: "Do-While Statement"
|
|
248
|
+
},
|
|
249
|
+
"Try-Catch Statement": {
|
|
250
|
+
prefix: "trycatch",
|
|
251
|
+
body: [
|
|
252
|
+
"try {",
|
|
253
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
254
|
+
"} catch (${1:error}) {",
|
|
255
|
+
"\t",
|
|
256
|
+
"}"
|
|
257
|
+
],
|
|
258
|
+
description: "Try-Catch Statement"
|
|
259
|
+
},
|
|
260
|
+
"Set Timeout Function": {
|
|
261
|
+
prefix: "settimeout",
|
|
262
|
+
body: [
|
|
263
|
+
"setTimeout(() => {",
|
|
264
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
265
|
+
"}, ${1:timeout});"
|
|
266
|
+
],
|
|
267
|
+
description: "Set Timeout Function"
|
|
268
|
+
},
|
|
269
|
+
"Region Start": {
|
|
270
|
+
prefix: "#region",
|
|
271
|
+
body: [
|
|
272
|
+
"//#region $0"
|
|
273
|
+
],
|
|
274
|
+
description: "Folding Region Start"
|
|
275
|
+
},
|
|
276
|
+
"Region End": {
|
|
277
|
+
prefix: "#endregion",
|
|
278
|
+
body: [
|
|
279
|
+
"//#endregion"
|
|
280
|
+
],
|
|
281
|
+
description: "Folding Region End"
|
|
282
|
+
},
|
|
283
|
+
"new Promise": {
|
|
284
|
+
prefix: "newpromise",
|
|
285
|
+
body: [
|
|
286
|
+
"new Promise<${1:void}>((resolve, reject) => {",
|
|
287
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
288
|
+
"})"
|
|
289
|
+
],
|
|
290
|
+
description: "Create a new Promise"
|
|
291
|
+
},
|
|
292
|
+
"Async Function Statement": {
|
|
293
|
+
prefix: "async function",
|
|
294
|
+
body: [
|
|
295
|
+
"async function ${1:name}(${2:params}:${3:type}) {",
|
|
296
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
297
|
+
"}"
|
|
298
|
+
],
|
|
299
|
+
description: "Async Function Statement"
|
|
300
|
+
},
|
|
301
|
+
"Async Function Expression": {
|
|
302
|
+
prefix: "async arrow function",
|
|
303
|
+
body: [
|
|
304
|
+
"async (${1:params}:${2:type}) => {",
|
|
305
|
+
"\t$TM_SELECTED_TEXT$0",
|
|
306
|
+
"}"
|
|
307
|
+
],
|
|
308
|
+
description: "Async Function Expression"
|
|
309
|
+
}
|
|
310
|
+
};
|
|
311
|
+
|
|
312
|
+
export { Constructor, typescriptBasics as default };
|
|
@@ -645,7 +645,12 @@ var typescriptLanguageFeatures = [
|
|
|
645
645
|
"double"
|
|
646
646
|
],
|
|
647
647
|
"default": "auto",
|
|
648
|
-
"markdownDescription": "Preferred quote style to use for quick fixes
|
|
648
|
+
"markdownDescription": "Preferred quote style to use for quick fixes.",
|
|
649
|
+
"markdownEnumDescriptions": [
|
|
650
|
+
"Infer quote type from existing code",
|
|
651
|
+
"Always use single quotes: `'`",
|
|
652
|
+
"Always use double quotes: `\"`"
|
|
653
|
+
],
|
|
649
654
|
"scope": 5
|
|
650
655
|
},
|
|
651
656
|
"typescript.preferences.quoteStyle": {
|
|
@@ -656,7 +661,12 @@ var typescriptLanguageFeatures = [
|
|
|
656
661
|
"double"
|
|
657
662
|
],
|
|
658
663
|
"default": "auto",
|
|
659
|
-
"markdownDescription": "Preferred quote style to use for quick fixes
|
|
664
|
+
"markdownDescription": "Preferred quote style to use for quick fixes.",
|
|
665
|
+
"markdownEnumDescriptions": [
|
|
666
|
+
"Infer quote type from existing code",
|
|
667
|
+
"Always use single quotes: `'`",
|
|
668
|
+
"Always use double quotes: `\"`"
|
|
669
|
+
],
|
|
660
670
|
"scope": 5
|
|
661
671
|
},
|
|
662
672
|
"javascript.preferences.importModuleSpecifier": {
|
|
@@ -739,7 +749,7 @@ var typescriptLanguageFeatures = [
|
|
|
739
749
|
"none"
|
|
740
750
|
],
|
|
741
751
|
"markdownEnumDescriptions": [
|
|
742
|
-
"Insert `={}` or `=\"\"` after attribute names based on the prop type.",
|
|
752
|
+
"Insert `={}` or `=\"\"` after attribute names based on the prop type. See `javascript.preferences.quoteStyle` to control the type of quotes used for string attributes.",
|
|
743
753
|
"Insert `={}` after attribute names.",
|
|
744
754
|
"Only insert attribute names."
|
|
745
755
|
],
|
|
@@ -755,7 +765,7 @@ var typescriptLanguageFeatures = [
|
|
|
755
765
|
"none"
|
|
756
766
|
],
|
|
757
767
|
"markdownEnumDescriptions": [
|
|
758
|
-
"Insert `={}` or `=\"\"` after attribute names based on the prop type.",
|
|
768
|
+
"Insert `={}` or `=\"\"` after attribute names based on the prop type. See `typescript.preferences.quoteStyle` to control the type of quotes used for string attributes.",
|
|
759
769
|
"Insert `={}` after attribute names.",
|
|
760
770
|
"Only insert attribute names."
|
|
761
771
|
],
|