PluginProbe
Code Block Pro – Beautiful Syntax Highlighting / 1.27.2
Code Block Pro – Beautiful Syntax Highlighting v1.27.2
1.27.1 1.27.2 1.27.3 1.27.4 1.27.5 1.27.6 1.27.7 1.28.0 1.3.0 1.4.0 1.5.0 1.5.1 1.5.2 1.6.0 1.7.0 1.8.0 1.9.0 1.9.1 1.9.2 1.9.3 trunk 1.1.0 1.10.0 1.11.0 1.11.1 All 63 releases
code-block-pro / build / shiki / languages / typescript.tmLanguage.json

typescript.tmLanguage.json in Code Block Pro – Beautiful Syntax Highlighting 1.27.2, at build/shiki/languages/typescript.tmLanguage.json

5,741 lines 253.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 {
2 "information_for_contributors": [
3 "This file has been converted from https://github.com/microsoft/TypeScript-TmLanguage/blob/master/TypeScript.tmLanguage",
4 "If you want to provide a fix or improvement, please create a pull request against the original repository.",
5 "Once accepted there, we are happy to receive an update request."
6 ],
7 "version": "https://github.com/microsoft/TypeScript-TmLanguage/commit/8c7482b94b548eab56da64dbfb30b82589b3f747",
8 "name": "typescript",
9 "scopeName": "source.ts",
10 "patterns": [
11 {
12 "include": "#directives"
13 },
14 {
15 "include": "#statements"
16 },
17 {
18 "include": "#shebang"
19 }
20 ],
21 "repository": {
22 "shebang": {
23 "name": "comment.line.shebang.ts",
24 "match": "\\A(#!).*(?=$)",
25 "captures": {
26 "1": {
27 "name": "punctuation.definition.comment.ts"
28 }
29 }
30 },
31 "statements": {
32 "patterns": [
33 {
34 "include": "#declaration"
35 },
36 {
37 "include": "#control-statement"
38 },
39 {
40 "include": "#after-operator-block-as-object-literal"
41 },
42 {
43 "include": "#decl-block"
44 },
45 {
46 "include": "#label"
47 },
48 {
49 "include": "#expression"
50 },
51 {
52 "include": "#punctuation-semicolon"
53 },
54 {
55 "include": "#string"
56 },
57 {
58 "include": "#comment"
59 }
60 ]
61 },
62 "declaration": {
63 "patterns": [
64 {
65 "include": "#decorator"
66 },
67 {
68 "include": "#var-expr"
69 },
70 {
71 "include": "#function-declaration"
72 },
73 {
74 "include": "#class-declaration"
75 },
76 {
77 "include": "#interface-declaration"
78 },
79 {
80 "include": "#enum-declaration"
81 },
82 {
83 "include": "#namespace-declaration"
84 },
85 {
86 "include": "#type-alias-declaration"
87 },
88 {
89 "include": "#import-equals-declaration"
90 },
91 {
92 "include": "#import-declaration"
93 },
94 {
95 "include": "#export-declaration"
96 },
97 {
98 "name": "storage.modifier.ts",
99 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
100 }
101 ]
102 },
103 "control-statement": {
104 "patterns": [
105 {
106 "include": "#switch-statement"
107 },
108 {
109 "include": "#for-loop"
110 },
111 {
112 "name": "keyword.control.trycatch.ts",
113 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
114 },
115 {
116 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
117 "captures": {
118 "1": {
119 "name": "keyword.control.loop.ts"
120 },
121 "2": {
122 "name": "entity.name.label.ts"
123 }
124 }
125 },
126 {
127 "name": "keyword.control.loop.ts",
128 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
129 },
130 {
131 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
132 "beginCaptures": {
133 "0": {
134 "name": "keyword.control.flow.ts"
135 }
136 },
137 "end": "(?=[;}]|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
138 "patterns": [
139 {
140 "include": "#expression"
141 }
142 ]
143 },
144 {
145 "name": "keyword.control.switch.ts",
146 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
147 },
148 {
149 "include": "#if-statement"
150 },
151 {
152 "name": "keyword.control.conditional.ts",
153 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
154 },
155 {
156 "name": "keyword.control.with.ts",
157 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
158 },
159 {
160 "name": "keyword.control.ts",
161 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
162 },
163 {
164 "name": "keyword.other.debugger.ts",
165 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
166 }
167 ]
168 },
169 "label": {
170 "patterns": [
171 {
172 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*\\{)",
173 "beginCaptures": {
174 "1": {
175 "name": "entity.name.label.ts"
176 },
177 "2": {
178 "name": "punctuation.separator.label.ts"
179 }
180 },
181 "end": "(?<=\\})",
182 "patterns": [
183 {
184 "include": "#decl-block"
185 }
186 ]
187 },
188 {
189 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
190 "captures": {
191 "1": {
192 "name": "entity.name.label.ts"
193 },
194 "2": {
195 "name": "punctuation.separator.label.ts"
196 }
197 }
198 }
199 ]
200 },
201 "expression": {
202 "patterns": [
203 {
204 "include": "#expressionWithoutIdentifiers"
205 },
206 {
207 "include": "#identifiers"
208 },
209 {
210 "include": "#expressionPunctuations"
211 }
212 ]
213 },
214 "expressionWithoutIdentifiers": {
215 "patterns": [
216 {
217 "include": "#string"
218 },
219 {
220 "include": "#regex"
221 },
222 {
223 "include": "#comment"
224 },
225 {
226 "include": "#function-expression"
227 },
228 {
229 "include": "#class-expression"
230 },
231 {
232 "include": "#arrow-function"
233 },
234 {
235 "include": "#paren-expression-possibly-arrow"
236 },
237 {
238 "include": "#cast"
239 },
240 {
241 "include": "#ternary-expression"
242 },
243 {
244 "include": "#new-expr"
245 },
246 {
247 "include": "#instanceof-expr"
248 },
249 {
250 "include": "#object-literal"
251 },
252 {
253 "include": "#expression-operators"
254 },
255 {
256 "include": "#function-call"
257 },
258 {
259 "include": "#literal"
260 },
261 {
262 "include": "#support-objects"
263 },
264 {
265 "include": "#paren-expression"
266 }
267 ]
268 },
269 "expressionPunctuations": {
270 "patterns": [
271 {
272 "include": "#punctuation-comma"
273 },
274 {
275 "include": "#punctuation-accessor"
276 }
277 ]
278 },
279 "decorator": {
280 "name": "meta.decorator.ts",
281 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\@",
282 "beginCaptures": {
283 "0": {
284 "name": "punctuation.decorator.ts"
285 }
286 },
287 "end": "(?=\\s)",
288 "patterns": [
289 {
290 "include": "#expression"
291 }
292 ]
293 },
294 "var-expr": {
295 "patterns": [
296 {
297 "name": "meta.var.expr.ts",
298 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
299 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^let|[^\\._$[:alnum:]]let|^var|[^\\._$[:alnum:]]var)(?=\\s*$)))",
300 "patterns": [
301 {
302 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(var|let)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
303 "beginCaptures": {
304 "1": {
305 "name": "keyword.control.export.ts"
306 },
307 "2": {
308 "name": "storage.modifier.ts"
309 },
310 "3": {
311 "name": "storage.type.ts"
312 }
313 },
314 "end": "(?=\\S)"
315 },
316 {
317 "include": "#destructuring-variable"
318 },
319 {
320 "include": "#var-single-variable"
321 },
322 {
323 "include": "#variable-initializer"
324 },
325 {
326 "include": "#comment"
327 },
328 {
329 "begin": "(,)\\s*(?=$|\\/\\/)",
330 "beginCaptures": {
331 "1": {
332 "name": "punctuation.separator.comma.ts"
333 }
334 },
335 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
336 "patterns": [
337 {
338 "include": "#single-line-comment-consuming-line-ending"
339 },
340 {
341 "include": "#comment"
342 },
343 {
344 "include": "#destructuring-variable"
345 },
346 {
347 "include": "#var-single-variable"
348 },
349 {
350 "include": "#punctuation-comma"
351 }
352 ]
353 },
354 {
355 "include": "#punctuation-comma"
356 }
357 ]
358 },
359 {
360 "name": "meta.var.expr.ts",
361 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
362 "beginCaptures": {
363 "1": {
364 "name": "keyword.control.export.ts"
365 },
366 "2": {
367 "name": "storage.modifier.ts"
368 },
369 "3": {
370 "name": "storage.type.ts"
371 }
372 },
373 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=^|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^const|[^\\._$[:alnum:]]const)(?=\\s*$)))",
374 "patterns": [
375 {
376 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(const(?!\\s+enum\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
377 "beginCaptures": {
378 "1": {
379 "name": "keyword.control.export.ts"
380 },
381 "2": {
382 "name": "storage.modifier.ts"
383 },
384 "3": {
385 "name": "storage.type.ts"
386 }
387 },
388 "end": "(?=\\S)"
389 },
390 {
391 "include": "#destructuring-const"
392 },
393 {
394 "include": "#var-single-const"
395 },
396 {
397 "include": "#variable-initializer"
398 },
399 {
400 "include": "#comment"
401 },
402 {
403 "begin": "(,)\\s*(?=$|\\/\\/)",
404 "beginCaptures": {
405 "1": {
406 "name": "punctuation.separator.comma.ts"
407 }
408 },
409 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
410 "patterns": [
411 {
412 "include": "#single-line-comment-consuming-line-ending"
413 },
414 {
415 "include": "#comment"
416 },
417 {
418 "include": "#destructuring-const"
419 },
420 {
421 "include": "#var-single-const"
422 },
423 {
424 "include": "#punctuation-comma"
425 }
426 ]
427 },
428 {
429 "include": "#punctuation-comma"
430 }
431 ]
432 },
433 {
434 "name": "meta.var.expr.ts",
435 "begin": "(?=(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
436 "beginCaptures": {
437 "1": {
438 "name": "keyword.control.export.ts"
439 },
440 "2": {
441 "name": "storage.modifier.ts"
442 },
443 "3": {
444 "name": "storage.type.ts"
445 }
446 },
447 "end": "(?!(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))((?=;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|((?<!^using|[^\\._$[:alnum:]]using|^await\\s+using|[^\\._$[:alnum:]]await\\s+using)(?=\\s*$)))",
448 "patterns": [
449 {
450 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b((?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
451 "beginCaptures": {
452 "1": {
453 "name": "keyword.control.export.ts"
454 },
455 "2": {
456 "name": "storage.modifier.ts"
457 },
458 "3": {
459 "name": "storage.type.ts"
460 }
461 },
462 "end": "(?=\\S)"
463 },
464 {
465 "include": "#var-single-const"
466 },
467 {
468 "include": "#variable-initializer"
469 },
470 {
471 "include": "#comment"
472 },
473 {
474 "begin": "(,)\\s*((?!\\S)|(?=\\/\\/))",
475 "beginCaptures": {
476 "1": {
477 "name": "punctuation.separator.comma.ts"
478 }
479 },
480 "end": "(?<!,)(((?==|;|}|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
481 "patterns": [
482 {
483 "include": "#single-line-comment-consuming-line-ending"
484 },
485 {
486 "include": "#comment"
487 },
488 {
489 "include": "#var-single-const"
490 },
491 {
492 "include": "#punctuation-comma"
493 }
494 ]
495 },
496 {
497 "include": "#punctuation-comma"
498 }
499 ]
500 }
501 ]
502 },
503 "var-single-variable": {
504 "patterns": [
505 {
506 "name": "meta.var-single-variable.expr.ts",
507 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(\\!)?(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
508 "beginCaptures": {
509 "1": {
510 "name": "meta.definition.variable.ts entity.name.function.ts"
511 },
512 "2": {
513 "name": "keyword.operator.definiteassignment.ts"
514 }
515 },
516 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
517 "patterns": [
518 {
519 "include": "#var-single-variable-type-annotation"
520 }
521 ]
522 },
523 {
524 "name": "meta.var-single-variable.expr.ts",
525 "begin": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\\!)?",
526 "beginCaptures": {
527 "1": {
528 "name": "meta.definition.variable.ts variable.other.constant.ts"
529 },
530 "2": {
531 "name": "keyword.operator.definiteassignment.ts"
532 }
533 },
534 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
535 "patterns": [
536 {
537 "include": "#var-single-variable-type-annotation"
538 }
539 ]
540 },
541 {
542 "name": "meta.var-single-variable.expr.ts",
543 "begin": "([_$[:alpha:]][_$[:alnum:]]*)(\\!)?",
544 "beginCaptures": {
545 "1": {
546 "name": "meta.definition.variable.ts variable.other.readwrite.ts"
547 },
548 "2": {
549 "name": "keyword.operator.definiteassignment.ts"
550 }
551 },
552 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
553 "patterns": [
554 {
555 "include": "#var-single-variable-type-annotation"
556 }
557 ]
558 }
559 ]
560 },
561 "var-single-const": {
562 "patterns": [
563 {
564 "name": "meta.var-single-variable.expr.ts",
565 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
566 "beginCaptures": {
567 "1": {
568 "name": "meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts"
569 }
570 },
571 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
572 "patterns": [
573 {
574 "include": "#var-single-variable-type-annotation"
575 }
576 ]
577 },
578 {
579 "name": "meta.var-single-variable.expr.ts",
580 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
581 "beginCaptures": {
582 "1": {
583 "name": "meta.definition.variable.ts variable.other.constant.ts"
584 }
585 },
586 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|(;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
587 "patterns": [
588 {
589 "include": "#var-single-variable-type-annotation"
590 }
591 ]
592 }
593 ]
594 },
595 "var-single-variable-type-annotation": {
596 "patterns": [
597 {
598 "include": "#type-annotation"
599 },
600 {
601 "include": "#string"
602 },
603 {
604 "include": "#comment"
605 }
606 ]
607 },
608 "destructuring-variable": {
609 "patterns": [
610 {
611 "name": "meta.object-binding-pattern-variable.ts",
612 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
613 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
614 "patterns": [
615 {
616 "include": "#object-binding-pattern"
617 },
618 {
619 "include": "#type-annotation"
620 },
621 {
622 "include": "#comment"
623 }
624 ]
625 },
626 {
627 "name": "meta.array-binding-pattern-variable.ts",
628 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
629 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
630 "patterns": [
631 {
632 "include": "#array-binding-pattern"
633 },
634 {
635 "include": "#type-annotation"
636 },
637 {
638 "include": "#comment"
639 }
640 ]
641 }
642 ]
643 },
644 "destructuring-const": {
645 "patterns": [
646 {
647 "name": "meta.object-binding-pattern-variable.ts",
648 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\{)",
649 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
650 "patterns": [
651 {
652 "include": "#object-binding-pattern-const"
653 },
654 {
655 "include": "#type-annotation"
656 },
657 {
658 "include": "#comment"
659 }
660 ]
661 },
662 {
663 "name": "meta.array-binding-pattern-variable.ts",
664 "begin": "(?<!=|:|^of|[^\\._$[:alnum:]]of|^in|[^\\._$[:alnum:]]in)\\s*(?=\\[)",
665 "end": "(?=$|^|[;,=}]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
666 "patterns": [
667 {
668 "include": "#array-binding-pattern-const"
669 },
670 {
671 "include": "#type-annotation"
672 },
673 {
674 "include": "#comment"
675 }
676 ]
677 }
678 ]
679 },
680 "object-binding-element": {
681 "patterns": [
682 {
683 "include": "#comment"
684 },
685 {
686 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
687 "end": "(?=,|\\})",
688 "patterns": [
689 {
690 "include": "#object-binding-element-propertyName"
691 },
692 {
693 "include": "#binding-element"
694 }
695 ]
696 },
697 {
698 "include": "#object-binding-pattern"
699 },
700 {
701 "include": "#destructuring-variable-rest"
702 },
703 {
704 "include": "#variable-initializer"
705 },
706 {
707 "include": "#punctuation-comma"
708 }
709 ]
710 },
711 "object-binding-element-const": {
712 "patterns": [
713 {
714 "include": "#comment"
715 },
716 {
717 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
718 "end": "(?=,|\\})",
719 "patterns": [
720 {
721 "include": "#object-binding-element-propertyName"
722 },
723 {
724 "include": "#binding-element-const"
725 }
726 ]
727 },
728 {
729 "include": "#object-binding-pattern-const"
730 },
731 {
732 "include": "#destructuring-variable-rest-const"
733 },
734 {
735 "include": "#variable-initializer"
736 },
737 {
738 "include": "#punctuation-comma"
739 }
740 ]
741 },
742 "object-binding-element-propertyName": {
743 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
744 "end": "(:)",
745 "endCaptures": {
746 "0": {
747 "name": "punctuation.destructuring.ts"
748 }
749 },
750 "patterns": [
751 {
752 "include": "#string"
753 },
754 {
755 "include": "#array-literal"
756 },
757 {
758 "include": "#numeric-literal"
759 },
760 {
761 "name": "variable.object.property.ts",
762 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
763 }
764 ]
765 },
766 "binding-element": {
767 "patterns": [
768 {
769 "include": "#comment"
770 },
771 {
772 "include": "#string"
773 },
774 {
775 "include": "#numeric-literal"
776 },
777 {
778 "include": "#regex"
779 },
780 {
781 "include": "#object-binding-pattern"
782 },
783 {
784 "include": "#array-binding-pattern"
785 },
786 {
787 "include": "#destructuring-variable-rest"
788 },
789 {
790 "include": "#variable-initializer"
791 }
792 ]
793 },
794 "binding-element-const": {
795 "patterns": [
796 {
797 "include": "#comment"
798 },
799 {
800 "include": "#string"
801 },
802 {
803 "include": "#numeric-literal"
804 },
805 {
806 "include": "#regex"
807 },
808 {
809 "include": "#object-binding-pattern-const"
810 },
811 {
812 "include": "#array-binding-pattern-const"
813 },
814 {
815 "include": "#destructuring-variable-rest-const"
816 },
817 {
818 "include": "#variable-initializer"
819 }
820 ]
821 },
822 "destructuring-variable-rest": {
823 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
824 "captures": {
825 "1": {
826 "name": "keyword.operator.rest.ts"
827 },
828 "2": {
829 "name": "meta.definition.variable.ts variable.other.readwrite.ts"
830 }
831 }
832 },
833 "destructuring-variable-rest-const": {
834 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
835 "captures": {
836 "1": {
837 "name": "keyword.operator.rest.ts"
838 },
839 "2": {
840 "name": "meta.definition.variable.ts variable.other.constant.ts"
841 }
842 }
843 },
844 "object-binding-pattern": {
845 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
846 "beginCaptures": {
847 "1": {
848 "name": "keyword.operator.rest.ts"
849 },
850 "2": {
851 "name": "punctuation.definition.binding-pattern.object.ts"
852 }
853 },
854 "end": "\\}",
855 "endCaptures": {
856 "0": {
857 "name": "punctuation.definition.binding-pattern.object.ts"
858 }
859 },
860 "patterns": [
861 {
862 "include": "#object-binding-element"
863 }
864 ]
865 },
866 "object-binding-pattern-const": {
867 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
868 "beginCaptures": {
869 "1": {
870 "name": "keyword.operator.rest.ts"
871 },
872 "2": {
873 "name": "punctuation.definition.binding-pattern.object.ts"
874 }
875 },
876 "end": "\\}",
877 "endCaptures": {
878 "0": {
879 "name": "punctuation.definition.binding-pattern.object.ts"
880 }
881 },
882 "patterns": [
883 {
884 "include": "#object-binding-element-const"
885 }
886 ]
887 },
888 "array-binding-pattern": {
889 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
890 "beginCaptures": {
891 "1": {
892 "name": "keyword.operator.rest.ts"
893 },
894 "2": {
895 "name": "punctuation.definition.binding-pattern.array.ts"
896 }
897 },
898 "end": "\\]",
899 "endCaptures": {
900 "0": {
901 "name": "punctuation.definition.binding-pattern.array.ts"
902 }
903 },
904 "patterns": [
905 {
906 "include": "#binding-element"
907 },
908 {
909 "include": "#punctuation-comma"
910 }
911 ]
912 },
913 "array-binding-pattern-const": {
914 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
915 "beginCaptures": {
916 "1": {
917 "name": "keyword.operator.rest.ts"
918 },
919 "2": {
920 "name": "punctuation.definition.binding-pattern.array.ts"
921 }
922 },
923 "end": "\\]",
924 "endCaptures": {
925 "0": {
926 "name": "punctuation.definition.binding-pattern.array.ts"
927 }
928 },
929 "patterns": [
930 {
931 "include": "#binding-element-const"
932 },
933 {
934 "include": "#punctuation-comma"
935 }
936 ]
937 },
938 "parameter-name": {
939 "patterns": [
940 {
941 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
942 "captures": {
943 "1": {
944 "name": "storage.modifier.ts"
945 }
946 }
947 },
948 {
949 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
950 "captures": {
951 "1": {
952 "name": "storage.modifier.ts"
953 },
954 "2": {
955 "name": "keyword.operator.rest.ts"
956 },
957 "3": {
958 "name": "entity.name.function.ts variable.language.this.ts"
959 },
960 "4": {
961 "name": "entity.name.function.ts"
962 },
963 "5": {
964 "name": "keyword.operator.optional.ts"
965 }
966 }
967 },
968 {
969 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)",
970 "captures": {
971 "1": {
972 "name": "storage.modifier.ts"
973 },
974 "2": {
975 "name": "keyword.operator.rest.ts"
976 },
977 "3": {
978 "name": "variable.parameter.ts variable.language.this.ts"
979 },
980 "4": {
981 "name": "variable.parameter.ts"
982 },
983 "5": {
984 "name": "keyword.operator.optional.ts"
985 }
986 }
987 }
988 ]
989 },
990 "destructuring-parameter": {
991 "patterns": [
992 {
993 "name": "meta.parameter.object-binding-pattern.ts",
994 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\{)",
995 "beginCaptures": {
996 "1": {
997 "name": "keyword.operator.rest.ts"
998 },
999 "2": {
1000 "name": "punctuation.definition.binding-pattern.object.ts"
1001 }
1002 },
1003 "end": "\\}",
1004 "endCaptures": {
1005 "0": {
1006 "name": "punctuation.definition.binding-pattern.object.ts"
1007 }
1008 },
1009 "patterns": [
1010 {
1011 "include": "#parameter-object-binding-element"
1012 }
1013 ]
1014 },
1015 {
1016 "name": "meta.paramter.array-binding-pattern.ts",
1017 "begin": "(?<!=|:)\\s*(?:(\\.\\.\\.)\\s*)?(\\[)",
1018 "beginCaptures": {
1019 "1": {
1020 "name": "keyword.operator.rest.ts"
1021 },
1022 "2": {
1023 "name": "punctuation.definition.binding-pattern.array.ts"
1024 }
1025 },
1026 "end": "\\]",
1027 "endCaptures": {
1028 "0": {
1029 "name": "punctuation.definition.binding-pattern.array.ts"
1030 }
1031 },
1032 "patterns": [
1033 {
1034 "include": "#parameter-binding-element"
1035 },
1036 {
1037 "include": "#punctuation-comma"
1038 }
1039 ]
1040 }
1041 ]
1042 },
1043 "parameter-object-binding-element": {
1044 "patterns": [
1045 {
1046 "include": "#comment"
1047 },
1048 {
1049 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(:))",
1050 "end": "(?=,|\\})",
1051 "patterns": [
1052 {
1053 "include": "#object-binding-element-propertyName"
1054 },
1055 {
1056 "include": "#parameter-binding-element"
1057 },
1058 {
1059 "include": "#paren-expression"
1060 }
1061 ]
1062 },
1063 {
1064 "include": "#parameter-object-binding-pattern"
1065 },
1066 {
1067 "include": "#destructuring-parameter-rest"
1068 },
1069 {
1070 "include": "#variable-initializer"
1071 },
1072 {
1073 "include": "#punctuation-comma"
1074 }
1075 ]
1076 },
1077 "parameter-binding-element": {
1078 "patterns": [
1079 {
1080 "include": "#comment"
1081 },
1082 {
1083 "include": "#string"
1084 },
1085 {
1086 "include": "#numeric-literal"
1087 },
1088 {
1089 "include": "#regex"
1090 },
1091 {
1092 "include": "#parameter-object-binding-pattern"
1093 },
1094 {
1095 "include": "#parameter-array-binding-pattern"
1096 },
1097 {
1098 "include": "#destructuring-parameter-rest"
1099 },
1100 {
1101 "include": "#variable-initializer"
1102 }
1103 ]
1104 },
1105 "destructuring-parameter-rest": {
1106 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
1107 "captures": {
1108 "1": {
1109 "name": "keyword.operator.rest.ts"
1110 },
1111 "2": {
1112 "name": "variable.parameter.ts"
1113 }
1114 }
1115 },
1116 "parameter-object-binding-pattern": {
1117 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1118 "beginCaptures": {
1119 "1": {
1120 "name": "keyword.operator.rest.ts"
1121 },
1122 "2": {
1123 "name": "punctuation.definition.binding-pattern.object.ts"
1124 }
1125 },
1126 "end": "\\}",
1127 "endCaptures": {
1128 "0": {
1129 "name": "punctuation.definition.binding-pattern.object.ts"
1130 }
1131 },
1132 "patterns": [
1133 {
1134 "include": "#parameter-object-binding-element"
1135 }
1136 ]
1137 },
1138 "parameter-array-binding-pattern": {
1139 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
1140 "beginCaptures": {
1141 "1": {
1142 "name": "keyword.operator.rest.ts"
1143 },
1144 "2": {
1145 "name": "punctuation.definition.binding-pattern.array.ts"
1146 }
1147 },
1148 "end": "\\]",
1149 "endCaptures": {
1150 "0": {
1151 "name": "punctuation.definition.binding-pattern.array.ts"
1152 }
1153 },
1154 "patterns": [
1155 {
1156 "include": "#parameter-binding-element"
1157 },
1158 {
1159 "include": "#punctuation-comma"
1160 }
1161 ]
1162 },
1163 "field-declaration": {
1164 "name": "meta.field.declaration.ts",
1165 "begin": "(?x)(?<!\\()(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|\\}|$))",
1166 "beginCaptures": {
1167 "1": {
1168 "name": "storage.modifier.ts"
1169 }
1170 },
1171 "end": "(?x)(?=\\}|;|,|$|(^(?!\\s*((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|(\\#?[_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(?:(?:(\\?)|(\\!))\\s*)?(=|:|;|,|$))))|(?<=\\})",
1172 "patterns": [
1173 {
1174 "include": "#variable-initializer"
1175 },
1176 {
1177 "include": "#type-annotation"
1178 },
1179 {
1180 "include": "#string"
1181 },
1182 {
1183 "include": "#array-literal"
1184 },
1185 {
1186 "include": "#numeric-literal"
1187 },
1188 {
1189 "include": "#comment"
1190 },
1191 {
1192 "match": "(?x)(\\#?[_$[:alpha:]][_$[:alnum:]]*)(?:(\\?)|(\\!))?(?=\\s*\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
1193 "captures": {
1194 "1": {
1195 "name": "meta.definition.property.ts entity.name.function.ts"
1196 },
1197 "2": {
1198 "name": "keyword.operator.optional.ts"
1199 },
1200 "3": {
1201 "name": "keyword.operator.definiteassignment.ts"
1202 }
1203 }
1204 },
1205 {
1206 "name": "meta.definition.property.ts variable.object.property.ts",
1207 "match": "\\#?[_$[:alpha:]][_$[:alnum:]]*"
1208 },
1209 {
1210 "name": "keyword.operator.optional.ts",
1211 "match": "\\?"
1212 },
1213 {
1214 "name": "keyword.operator.definiteassignment.ts",
1215 "match": "\\!"
1216 }
1217 ]
1218 },
1219 "variable-initializer": {
1220 "patterns": [
1221 {
1222 "begin": "(?<!=|!)(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)",
1223 "beginCaptures": {
1224 "1": {
1225 "name": "keyword.operator.assignment.ts"
1226 }
1227 },
1228 "end": "(?=$|^|[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
1229 "patterns": [
1230 {
1231 "include": "#expression"
1232 }
1233 ]
1234 },
1235 {
1236 "begin": "(?<!=|!)(=)(?!=)",
1237 "beginCaptures": {
1238 "1": {
1239 "name": "keyword.operator.assignment.ts"
1240 }
1241 },
1242 "end": "(?=[,);}\\]]|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<![\\|\\&\\+\\-\\*\\/])(?<=\\S)(?<!=)(?=\\s*$)",
1243 "patterns": [
1244 {
1245 "include": "#expression"
1246 }
1247 ]
1248 }
1249 ]
1250 },
1251 "function-declaration": {
1252 "name": "meta.function.ts",
1253 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1254 "beginCaptures": {
1255 "1": {
1256 "name": "keyword.control.export.ts"
1257 },
1258 "2": {
1259 "name": "storage.modifier.ts"
1260 },
1261 "3": {
1262 "name": "storage.modifier.async.ts"
1263 },
1264 "4": {
1265 "name": "storage.type.function.ts"
1266 },
1267 "5": {
1268 "name": "keyword.generator.asterisk.ts"
1269 },
1270 "6": {
1271 "name": "meta.definition.function.ts entity.name.function.ts"
1272 }
1273 },
1274 "end": "(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))|(?<=\\})",
1275 "patterns": [
1276 {
1277 "include": "#function-name"
1278 },
1279 {
1280 "include": "#function-body"
1281 }
1282 ]
1283 },
1284 "function-expression": {
1285 "name": "meta.function.expression.ts",
1286 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1287 "beginCaptures": {
1288 "1": {
1289 "name": "storage.modifier.async.ts"
1290 },
1291 "2": {
1292 "name": "storage.type.function.ts"
1293 },
1294 "3": {
1295 "name": "keyword.generator.asterisk.ts"
1296 },
1297 "4": {
1298 "name": "meta.definition.function.ts entity.name.function.ts"
1299 }
1300 },
1301 "end": "(?=;)|(?<=\\})",
1302 "patterns": [
1303 {
1304 "include": "#function-name"
1305 },
1306 {
1307 "include": "#single-line-comment-consuming-line-ending"
1308 },
1309 {
1310 "include": "#function-body"
1311 }
1312 ]
1313 },
1314 "function-name": {
1315 "name": "meta.definition.function.ts entity.name.function.ts",
1316 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1317 },
1318 "function-body": {
1319 "patterns": [
1320 {
1321 "include": "#comment"
1322 },
1323 {
1324 "include": "#type-parameters"
1325 },
1326 {
1327 "include": "#function-parameters"
1328 },
1329 {
1330 "include": "#return-type"
1331 },
1332 {
1333 "include": "#type-function-return-type"
1334 },
1335 {
1336 "include": "#decl-block"
1337 },
1338 {
1339 "name": "keyword.generator.asterisk.ts",
1340 "match": "\\*"
1341 }
1342 ]
1343 },
1344 "method-declaration": {
1345 "patterns": [
1346 {
1347 "name": "meta.method.declaration.ts",
1348 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1349 "beginCaptures": {
1350 "1": {
1351 "name": "storage.modifier.ts"
1352 },
1353 "2": {
1354 "name": "storage.modifier.ts"
1355 },
1356 "3": {
1357 "name": "storage.modifier.ts"
1358 },
1359 "4": {
1360 "name": "storage.modifier.async.ts"
1361 },
1362 "5": {
1363 "name": "storage.type.ts"
1364 }
1365 },
1366 "end": "(?=\\}|;|,|$)|(?<=\\})",
1367 "patterns": [
1368 {
1369 "include": "#method-declaration-name"
1370 },
1371 {
1372 "include": "#function-body"
1373 }
1374 ]
1375 },
1376 {
1377 "name": "meta.method.declaration.ts",
1378 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:(?:\\s*\\b(new)\\b(?!:)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(?:(\\*)\\s*)?)(?=\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1379 "beginCaptures": {
1380 "1": {
1381 "name": "storage.modifier.ts"
1382 },
1383 "2": {
1384 "name": "storage.modifier.ts"
1385 },
1386 "3": {
1387 "name": "storage.modifier.ts"
1388 },
1389 "4": {
1390 "name": "storage.modifier.async.ts"
1391 },
1392 "5": {
1393 "name": "keyword.operator.new.ts"
1394 },
1395 "6": {
1396 "name": "keyword.generator.asterisk.ts"
1397 }
1398 },
1399 "end": "(?=\\}|;|,|$)|(?<=\\})",
1400 "patterns": [
1401 {
1402 "include": "#method-declaration-name"
1403 },
1404 {
1405 "include": "#function-body"
1406 }
1407 ]
1408 },
1409 {
1410 "name": "meta.method.declaration.ts",
1411 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1412 "beginCaptures": {
1413 "1": {
1414 "name": "storage.modifier.ts"
1415 },
1416 "2": {
1417 "name": "storage.modifier.ts"
1418 },
1419 "3": {
1420 "name": "storage.modifier.ts"
1421 },
1422 "4": {
1423 "name": "storage.modifier.async.ts"
1424 },
1425 "5": {
1426 "name": "storage.type.property.ts"
1427 },
1428 "6": {
1429 "name": "keyword.generator.asterisk.ts"
1430 }
1431 },
1432 "end": "(?=\\}|;|,|$)|(?<=\\})",
1433 "patterns": [
1434 {
1435 "include": "#method-declaration-name"
1436 },
1437 {
1438 "include": "#function-body"
1439 }
1440 ]
1441 }
1442 ]
1443 },
1444 "object-literal-method-declaration": {
1445 "name": "meta.method.declaration.ts",
1446 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1447 "beginCaptures": {
1448 "1": {
1449 "name": "storage.modifier.async.ts"
1450 },
1451 "2": {
1452 "name": "storage.type.property.ts"
1453 },
1454 "3": {
1455 "name": "keyword.generator.asterisk.ts"
1456 }
1457 },
1458 "end": "(?=\\}|;|,)|(?<=\\})",
1459 "patterns": [
1460 {
1461 "include": "#method-declaration-name"
1462 },
1463 {
1464 "include": "#function-body"
1465 },
1466 {
1467 "begin": "(?x)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(\\*)\\s*)?(?=\\s*(((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?[\\(])",
1468 "beginCaptures": {
1469 "1": {
1470 "name": "storage.modifier.async.ts"
1471 },
1472 "2": {
1473 "name": "storage.type.property.ts"
1474 },
1475 "3": {
1476 "name": "keyword.generator.asterisk.ts"
1477 }
1478 },
1479 "end": "(?=\\(|\\<)",
1480 "patterns": [
1481 {
1482 "include": "#method-declaration-name"
1483 }
1484 ]
1485 }
1486 ]
1487 },
1488 "method-declaration-name": {
1489 "begin": "(?x)(?=((\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
1490 "end": "(?=\\(|\\<)",
1491 "patterns": [
1492 {
1493 "include": "#string"
1494 },
1495 {
1496 "include": "#array-literal"
1497 },
1498 {
1499 "include": "#numeric-literal"
1500 },
1501 {
1502 "name": "meta.definition.method.ts entity.name.function.ts",
1503 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1504 },
1505 {
1506 "name": "keyword.operator.optional.ts",
1507 "match": "\\?"
1508 }
1509 ]
1510 },
1511 "arrow-function": {
1512 "patterns": [
1513 {
1514 "name": "meta.arrow.ts",
1515 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
1516 "captures": {
1517 "1": {
1518 "name": "storage.modifier.async.ts"
1519 },
1520 "2": {
1521 "name": "variable.parameter.ts"
1522 }
1523 }
1524 },
1525 {
1526 "name": "meta.arrow.ts",
1527 "begin": "(?x) (?:\n (?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(\\basync)\n)? ((?<![})!\\]])\\s*\n (?=\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n )\n)",
1528 "beginCaptures": {
1529 "1": {
1530 "name": "storage.modifier.async.ts"
1531 }
1532 },
1533 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
1534 "patterns": [
1535 {
1536 "include": "#comment"
1537 },
1538 {
1539 "include": "#type-parameters"
1540 },
1541 {
1542 "include": "#function-parameters"
1543 },
1544 {
1545 "include": "#arrow-return-type"
1546 },
1547 {
1548 "include": "#possibly-arrow-return-type"
1549 }
1550 ]
1551 },
1552 {
1553 "name": "meta.arrow.ts",
1554 "begin": "=>",
1555 "beginCaptures": {
1556 "0": {
1557 "name": "storage.type.function.arrow.ts"
1558 }
1559 },
1560 "end": "((?<=\\}|\\S)(?<!=>)|((?!\\{)(?=\\S)))(?!\\/[\\/\\*])",
1561 "patterns": [
1562 {
1563 "include": "#single-line-comment-consuming-line-ending"
1564 },
1565 {
1566 "include": "#decl-block"
1567 },
1568 {
1569 "include": "#expression"
1570 }
1571 ]
1572 }
1573 ]
1574 },
1575 "indexer-declaration": {
1576 "name": "meta.indexer.declaration.ts",
1577 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1578 "beginCaptures": {
1579 "1": {
1580 "name": "storage.modifier.ts"
1581 },
1582 "2": {
1583 "name": "meta.brace.square.ts"
1584 },
1585 "3": {
1586 "name": "variable.parameter.ts"
1587 }
1588 },
1589 "end": "(\\])\\s*(\\?\\s*)?|$",
1590 "endCaptures": {
1591 "1": {
1592 "name": "meta.brace.square.ts"
1593 },
1594 "2": {
1595 "name": "keyword.operator.optional.ts"
1596 }
1597 },
1598 "patterns": [
1599 {
1600 "include": "#type-annotation"
1601 }
1602 ]
1603 },
1604 "indexer-mapped-type-declaration": {
1605 "name": "meta.indexer.mappedtype.declaration.ts",
1606 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([+-])?(readonly)\\s*)?\\s*(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s+(in)\\s+",
1607 "beginCaptures": {
1608 "1": {
1609 "name": "keyword.operator.type.modifier.ts"
1610 },
1611 "2": {
1612 "name": "storage.modifier.ts"
1613 },
1614 "3": {
1615 "name": "meta.brace.square.ts"
1616 },
1617 "4": {
1618 "name": "entity.name.type.ts"
1619 },
1620 "5": {
1621 "name": "keyword.operator.expression.in.ts"
1622 }
1623 },
1624 "end": "(\\])([+-])?\\s*(\\?\\s*)?|$",
1625 "endCaptures": {
1626 "1": {
1627 "name": "meta.brace.square.ts"
1628 },
1629 "2": {
1630 "name": "keyword.operator.type.modifier.ts"
1631 },
1632 "3": {
1633 "name": "keyword.operator.optional.ts"
1634 }
1635 },
1636 "patterns": [
1637 {
1638 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+",
1639 "captures": {
1640 "1": {
1641 "name": "keyword.control.as.ts"
1642 }
1643 }
1644 },
1645 {
1646 "include": "#type"
1647 }
1648 ]
1649 },
1650 "function-parameters": {
1651 "name": "meta.parameters.ts",
1652 "begin": "\\(",
1653 "beginCaptures": {
1654 "0": {
1655 "name": "punctuation.definition.parameters.begin.ts"
1656 }
1657 },
1658 "end": "\\)",
1659 "endCaptures": {
1660 "0": {
1661 "name": "punctuation.definition.parameters.end.ts"
1662 }
1663 },
1664 "patterns": [
1665 {
1666 "include": "#function-parameters-body"
1667 }
1668 ]
1669 },
1670 "function-parameters-body": {
1671 "patterns": [
1672 {
1673 "include": "#comment"
1674 },
1675 {
1676 "include": "#string"
1677 },
1678 {
1679 "include": "#decorator"
1680 },
1681 {
1682 "include": "#destructuring-parameter"
1683 },
1684 {
1685 "include": "#parameter-name"
1686 },
1687 {
1688 "include": "#parameter-type-annotation"
1689 },
1690 {
1691 "include": "#variable-initializer"
1692 },
1693 {
1694 "name": "punctuation.separator.parameter.ts",
1695 "match": ","
1696 }
1697 ]
1698 },
1699 "class-declaration": {
1700 "name": "meta.class.ts",
1701 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[/*])",
1702 "beginCaptures": {
1703 "1": {
1704 "name": "keyword.control.export.ts"
1705 },
1706 "2": {
1707 "name": "storage.modifier.ts"
1708 },
1709 "3": {
1710 "name": "storage.modifier.ts"
1711 },
1712 "4": {
1713 "name": "storage.type.class.ts"
1714 }
1715 },
1716 "end": "(?<=\\})",
1717 "patterns": [
1718 {
1719 "include": "#class-declaration-or-expression-patterns"
1720 }
1721 ]
1722 },
1723 "class-expression": {
1724 "name": "meta.class.ts",
1725 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|\\/[\\/*])",
1726 "beginCaptures": {
1727 "1": {
1728 "name": "storage.modifier.ts"
1729 },
1730 "2": {
1731 "name": "storage.type.class.ts"
1732 }
1733 },
1734 "end": "(?<=\\})",
1735 "patterns": [
1736 {
1737 "include": "#class-declaration-or-expression-patterns"
1738 }
1739 ]
1740 },
1741 "class-declaration-or-expression-patterns": {
1742 "patterns": [
1743 {
1744 "include": "#comment"
1745 },
1746 {
1747 "include": "#class-or-interface-heritage"
1748 },
1749 {
1750 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1751 "captures": {
1752 "0": {
1753 "name": "entity.name.type.class.ts"
1754 }
1755 }
1756 },
1757 {
1758 "include": "#type-parameters"
1759 },
1760 {
1761 "include": "#class-or-interface-body"
1762 }
1763 ]
1764 },
1765 "interface-declaration": {
1766 "name": "meta.interface.ts",
1767 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[/*])",
1768 "beginCaptures": {
1769 "1": {
1770 "name": "keyword.control.export.ts"
1771 },
1772 "2": {
1773 "name": "storage.modifier.ts"
1774 },
1775 "3": {
1776 "name": "storage.modifier.ts"
1777 },
1778 "4": {
1779 "name": "storage.type.interface.ts"
1780 }
1781 },
1782 "end": "(?<=\\})",
1783 "patterns": [
1784 {
1785 "include": "#comment"
1786 },
1787 {
1788 "include": "#class-or-interface-heritage"
1789 },
1790 {
1791 "match": "[_$[:alpha:]][_$[:alnum:]]*",
1792 "captures": {
1793 "0": {
1794 "name": "entity.name.type.interface.ts"
1795 }
1796 }
1797 },
1798 {
1799 "include": "#type-parameters"
1800 },
1801 {
1802 "include": "#class-or-interface-body"
1803 }
1804 ]
1805 },
1806 "class-or-interface-heritage": {
1807 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(extends|implements)\\b)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1808 "beginCaptures": {
1809 "1": {
1810 "name": "storage.modifier.ts"
1811 }
1812 },
1813 "end": "(?=\\{)",
1814 "patterns": [
1815 {
1816 "include": "#comment"
1817 },
1818 {
1819 "include": "#class-or-interface-heritage"
1820 },
1821 {
1822 "include": "#type-parameters"
1823 },
1824 {
1825 "include": "#expressionWithoutIdentifiers"
1826 },
1827 {
1828 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\??\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*)",
1829 "captures": {
1830 "1": {
1831 "name": "entity.name.type.module.ts"
1832 },
1833 "2": {
1834 "name": "punctuation.accessor.ts"
1835 },
1836 "3": {
1837 "name": "punctuation.accessor.optional.ts"
1838 }
1839 }
1840 },
1841 {
1842 "match": "([_$[:alpha:]][_$[:alnum:]]*)",
1843 "captures": {
1844 "1": {
1845 "name": "entity.other.inherited-class.ts"
1846 }
1847 }
1848 },
1849 {
1850 "include": "#expressionPunctuations"
1851 }
1852 ]
1853 },
1854 "class-or-interface-body": {
1855 "begin": "\\{",
1856 "beginCaptures": {
1857 "0": {
1858 "name": "punctuation.definition.block.ts"
1859 }
1860 },
1861 "end": "\\}",
1862 "endCaptures": {
1863 "0": {
1864 "name": "punctuation.definition.block.ts"
1865 }
1866 },
1867 "patterns": [
1868 {
1869 "include": "#comment"
1870 },
1871 {
1872 "include": "#decorator"
1873 },
1874 {
1875 "begin": "(?<=:)\\s*",
1876 "end": "(?=\\s|[;),}\\]:\\-\\+]|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
1877 "patterns": [
1878 {
1879 "include": "#expression"
1880 }
1881 ]
1882 },
1883 {
1884 "include": "#method-declaration"
1885 },
1886 {
1887 "include": "#indexer-declaration"
1888 },
1889 {
1890 "include": "#field-declaration"
1891 },
1892 {
1893 "include": "#string"
1894 },
1895 {
1896 "include": "#type-annotation"
1897 },
1898 {
1899 "include": "#variable-initializer"
1900 },
1901 {
1902 "include": "#access-modifier"
1903 },
1904 {
1905 "include": "#property-accessor"
1906 },
1907 {
1908 "include": "#async-modifier"
1909 },
1910 {
1911 "include": "#after-operator-block-as-object-literal"
1912 },
1913 {
1914 "include": "#decl-block"
1915 },
1916 {
1917 "include": "#expression"
1918 },
1919 {
1920 "include": "#punctuation-comma"
1921 },
1922 {
1923 "include": "#punctuation-semicolon"
1924 }
1925 ]
1926 },
1927 "access-modifier": {
1928 "name": "storage.modifier.ts",
1929 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1930 },
1931 "property-accessor": {
1932 "name": "storage.type.property.ts",
1933 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1934 },
1935 "async-modifier": {
1936 "name": "storage.modifier.async.ts",
1937 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
1938 },
1939 "enum-declaration": {
1940 "name": "meta.enum.declaration.ts",
1941 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
1942 "beginCaptures": {
1943 "1": {
1944 "name": "keyword.control.export.ts"
1945 },
1946 "2": {
1947 "name": "storage.modifier.ts"
1948 },
1949 "3": {
1950 "name": "storage.modifier.ts"
1951 },
1952 "4": {
1953 "name": "storage.type.enum.ts"
1954 },
1955 "5": {
1956 "name": "entity.name.type.enum.ts"
1957 }
1958 },
1959 "end": "(?<=\\})",
1960 "patterns": [
1961 {
1962 "include": "#comment"
1963 },
1964 {
1965 "begin": "\\{",
1966 "beginCaptures": {
1967 "0": {
1968 "name": "punctuation.definition.block.ts"
1969 }
1970 },
1971 "end": "\\}",
1972 "endCaptures": {
1973 "0": {
1974 "name": "punctuation.definition.block.ts"
1975 }
1976 },
1977 "patterns": [
1978 {
1979 "include": "#comment"
1980 },
1981 {
1982 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
1983 "beginCaptures": {
1984 "0": {
1985 "name": "variable.other.enummember.ts"
1986 }
1987 },
1988 "end": "(?=,|\\}|$)",
1989 "patterns": [
1990 {
1991 "include": "#comment"
1992 },
1993 {
1994 "include": "#variable-initializer"
1995 }
1996 ]
1997 },
1998 {
1999 "begin": "(?=((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])+\\])))",
2000 "end": "(?=,|\\}|$)",
2001 "patterns": [
2002 {
2003 "include": "#string"
2004 },
2005 {
2006 "include": "#array-literal"
2007 },
2008 {
2009 "include": "#comment"
2010 },
2011 {
2012 "include": "#variable-initializer"
2013 }
2014 ]
2015 },
2016 {
2017 "include": "#punctuation-comma"
2018 }
2019 ]
2020 }
2021 ]
2022 },
2023 "namespace-declaration": {
2024 "name": "meta.namespace.declaration.ts",
2025 "begin": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(namespace|module)\\s+(?=[_$[:alpha:]\"'`]))",
2026 "beginCaptures": {
2027 "1": {
2028 "name": "keyword.control.export.ts"
2029 },
2030 "2": {
2031 "name": "storage.modifier.ts"
2032 },
2033 "3": {
2034 "name": "storage.type.namespace.ts"
2035 }
2036 },
2037 "end": "(?<=\\})|(?=;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2038 "patterns": [
2039 {
2040 "include": "#comment"
2041 },
2042 {
2043 "include": "#string"
2044 },
2045 {
2046 "name": "entity.name.type.module.ts",
2047 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2048 },
2049 {
2050 "include": "#punctuation-accessor"
2051 },
2052 {
2053 "include": "#decl-block"
2054 }
2055 ]
2056 },
2057 "type-alias-declaration": {
2058 "name": "meta.type.declaration.ts",
2059 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
2060 "beginCaptures": {
2061 "1": {
2062 "name": "keyword.control.export.ts"
2063 },
2064 "2": {
2065 "name": "storage.modifier.ts"
2066 },
2067 "3": {
2068 "name": "storage.type.type.ts"
2069 },
2070 "4": {
2071 "name": "entity.name.type.alias.ts"
2072 }
2073 },
2074 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2075 "patterns": [
2076 {
2077 "include": "#comment"
2078 },
2079 {
2080 "include": "#type-parameters"
2081 },
2082 {
2083 "begin": "(=)\\s*(intrinsic)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2084 "beginCaptures": {
2085 "1": {
2086 "name": "keyword.operator.assignment.ts"
2087 },
2088 "2": {
2089 "name": "keyword.control.intrinsic.ts"
2090 }
2091 },
2092 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2093 "patterns": [
2094 {
2095 "include": "#type"
2096 }
2097 ]
2098 },
2099 {
2100 "begin": "(=)\\s*",
2101 "beginCaptures": {
2102 "1": {
2103 "name": "keyword.operator.assignment.ts"
2104 }
2105 },
2106 "end": "(?=\\}|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2107 "patterns": [
2108 {
2109 "include": "#type"
2110 }
2111 ]
2112 }
2113 ]
2114 },
2115 "import-equals-declaration": {
2116 "patterns": [
2117 {
2118 "name": "meta.import-equals.external.ts",
2119 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
2120 "beginCaptures": {
2121 "1": {
2122 "name": "keyword.control.export.ts"
2123 },
2124 "2": {
2125 "name": "storage.modifier.ts"
2126 },
2127 "3": {
2128 "name": "keyword.control.import.ts"
2129 },
2130 "4": {
2131 "name": "keyword.control.type.ts"
2132 },
2133 "5": {
2134 "name": "variable.other.readwrite.alias.ts"
2135 },
2136 "6": {
2137 "name": "keyword.operator.assignment.ts"
2138 },
2139 "7": {
2140 "name": "keyword.control.require.ts"
2141 },
2142 "8": {
2143 "name": "meta.brace.round.ts"
2144 }
2145 },
2146 "end": "\\)",
2147 "endCaptures": {
2148 "0": {
2149 "name": "meta.brace.round.ts"
2150 }
2151 },
2152 "patterns": [
2153 {
2154 "include": "#comment"
2155 },
2156 {
2157 "include": "#string"
2158 }
2159 ]
2160 },
2161 {
2162 "name": "meta.import-equals.internal.ts",
2163 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
2164 "beginCaptures": {
2165 "1": {
2166 "name": "keyword.control.export.ts"
2167 },
2168 "2": {
2169 "name": "storage.modifier.ts"
2170 },
2171 "3": {
2172 "name": "keyword.control.import.ts"
2173 },
2174 "4": {
2175 "name": "keyword.control.type.ts"
2176 },
2177 "5": {
2178 "name": "variable.other.readwrite.alias.ts"
2179 },
2180 "6": {
2181 "name": "keyword.operator.assignment.ts"
2182 }
2183 },
2184 "end": "(?=;|$|^)",
2185 "patterns": [
2186 {
2187 "include": "#single-line-comment-consuming-line-ending"
2188 },
2189 {
2190 "include": "#comment"
2191 },
2192 {
2193 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
2194 "captures": {
2195 "1": {
2196 "name": "entity.name.type.module.ts"
2197 },
2198 "2": {
2199 "name": "punctuation.accessor.ts"
2200 },
2201 "3": {
2202 "name": "punctuation.accessor.optional.ts"
2203 }
2204 }
2205 },
2206 {
2207 "name": "variable.other.readwrite.ts",
2208 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2209 }
2210 ]
2211 }
2212 ]
2213 },
2214 "import-declaration": {
2215 "name": "meta.import.ts",
2216 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(\\bexport)\\s+)?(?:(\\bdeclare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[:\\(])(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2217 "beginCaptures": {
2218 "1": {
2219 "name": "keyword.control.export.ts"
2220 },
2221 "2": {
2222 "name": "storage.modifier.ts"
2223 },
2224 "3": {
2225 "name": "keyword.control.import.ts"
2226 },
2227 "4": {
2228 "name": "keyword.control.type.ts"
2229 }
2230 },
2231 "end": "(?<!^import|[^\\._$[:alnum:]]import)(?=;|$|^)",
2232 "patterns": [
2233 {
2234 "include": "#single-line-comment-consuming-line-ending"
2235 },
2236 {
2237 "include": "#comment"
2238 },
2239 {
2240 "include": "#string"
2241 },
2242 {
2243 "begin": "(?<=^import|[^\\._$[:alnum:]]import)(?!\\s*[\"'])",
2244 "end": "\\bfrom\\b",
2245 "endCaptures": {
2246 "0": {
2247 "name": "keyword.control.from.ts"
2248 }
2249 },
2250 "patterns": [
2251 {
2252 "include": "#import-export-declaration"
2253 }
2254 ]
2255 },
2256 {
2257 "include": "#import-export-declaration"
2258 }
2259 ]
2260 },
2261 "export-declaration": {
2262 "patterns": [
2263 {
2264 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
2265 "captures": {
2266 "1": {
2267 "name": "keyword.control.export.ts"
2268 },
2269 "2": {
2270 "name": "keyword.control.as.ts"
2271 },
2272 "3": {
2273 "name": "storage.type.namespace.ts"
2274 },
2275 "4": {
2276 "name": "entity.name.type.module.ts"
2277 }
2278 }
2279 },
2280 {
2281 "name": "meta.export.default.ts",
2282 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
2283 "beginCaptures": {
2284 "1": {
2285 "name": "keyword.control.export.ts"
2286 },
2287 "2": {
2288 "name": "keyword.control.type.ts"
2289 },
2290 "3": {
2291 "name": "keyword.operator.assignment.ts"
2292 },
2293 "4": {
2294 "name": "keyword.control.default.ts"
2295 }
2296 },
2297 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2298 "patterns": [
2299 {
2300 "include": "#interface-declaration"
2301 },
2302 {
2303 "include": "#expression"
2304 }
2305 ]
2306 },
2307 {
2308 "name": "meta.export.ts",
2309 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?\\b(?!(\\$)|(\\s*:))((?=\\s*[\\{*])|((?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s|,))(?!\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b)))",
2310 "beginCaptures": {
2311 "1": {
2312 "name": "keyword.control.export.ts"
2313 },
2314 "2": {
2315 "name": "keyword.control.type.ts"
2316 }
2317 },
2318 "end": "(?=$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
2319 "patterns": [
2320 {
2321 "include": "#import-export-declaration"
2322 }
2323 ]
2324 }
2325 ]
2326 },
2327 "import-export-declaration": {
2328 "patterns": [
2329 {
2330 "include": "#comment"
2331 },
2332 {
2333 "include": "#string"
2334 },
2335 {
2336 "include": "#import-export-block"
2337 },
2338 {
2339 "name": "keyword.control.from.ts",
2340 "match": "\\bfrom\\b"
2341 },
2342 {
2343 "include": "#import-export-assert-clause"
2344 },
2345 {
2346 "include": "#import-export-clause"
2347 }
2348 ]
2349 },
2350 "import-export-assert-clause": {
2351 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(assert)\\s*(\\{)",
2352 "beginCaptures": {
2353 "1": {
2354 "name": "keyword.control.assert.ts"
2355 },
2356 "2": {
2357 "name": "punctuation.definition.block.ts"
2358 }
2359 },
2360 "end": "\\}",
2361 "endCaptures": {
2362 "0": {
2363 "name": "punctuation.definition.block.ts"
2364 }
2365 },
2366 "patterns": [
2367 {
2368 "include": "#comment"
2369 },
2370 {
2371 "include": "#string"
2372 },
2373 {
2374 "name": "meta.object-literal.key.ts",
2375 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)"
2376 },
2377 {
2378 "name": "punctuation.separator.key-value.ts",
2379 "match": ":"
2380 }
2381 ]
2382 },
2383 "import-export-block": {
2384 "name": "meta.block.ts",
2385 "begin": "\\{",
2386 "beginCaptures": {
2387 "0": {
2388 "name": "punctuation.definition.block.ts"
2389 }
2390 },
2391 "end": "\\}",
2392 "endCaptures": {
2393 "0": {
2394 "name": "punctuation.definition.block.ts"
2395 }
2396 },
2397 "patterns": [
2398 {
2399 "include": "#import-export-clause"
2400 }
2401 ]
2402 },
2403 "import-export-clause": {
2404 "patterns": [
2405 {
2406 "include": "#comment"
2407 },
2408 {
2409 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(?:(\\btype)\\s+)?(?:(\\bdefault)|(\\*)|(\\b[_$[:alpha:]][_$[:alnum:]]*)))\\s+(as)\\s+(?:(default(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([_$[:alpha:]][_$[:alnum:]]*))",
2410 "captures": {
2411 "1": {
2412 "name": "keyword.control.type.ts"
2413 },
2414 "2": {
2415 "name": "keyword.control.default.ts"
2416 },
2417 "3": {
2418 "name": "constant.language.import-export-all.ts"
2419 },
2420 "4": {
2421 "name": "variable.other.readwrite.ts"
2422 },
2423 "5": {
2424 "name": "keyword.control.as.ts"
2425 },
2426 "6": {
2427 "name": "keyword.control.default.ts"
2428 },
2429 "7": {
2430 "name": "variable.other.readwrite.alias.ts"
2431 }
2432 }
2433 },
2434 {
2435 "include": "#punctuation-comma"
2436 },
2437 {
2438 "name": "constant.language.import-export-all.ts",
2439 "match": "\\*"
2440 },
2441 {
2442 "name": "keyword.control.default.ts",
2443 "match": "\\b(default)\\b"
2444 },
2445 {
2446 "match": "(?:(\\btype)\\s+)?([_$[:alpha:]][_$[:alnum:]]*)",
2447 "captures": {
2448 "1": {
2449 "name": "keyword.control.type.ts"
2450 },
2451 "2": {
2452 "name": "variable.other.readwrite.alias.ts"
2453 }
2454 }
2455 }
2456 ]
2457 },
2458 "switch-statement": {
2459 "name": "switch-statement.expr.ts",
2460 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()",
2461 "end": "\\}",
2462 "endCaptures": {
2463 "0": {
2464 "name": "punctuation.definition.block.ts"
2465 }
2466 },
2467 "patterns": [
2468 {
2469 "include": "#comment"
2470 },
2471 {
2472 "name": "switch-expression.expr.ts",
2473 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()",
2474 "beginCaptures": {
2475 "1": {
2476 "name": "keyword.control.switch.ts"
2477 },
2478 "2": {
2479 "name": "meta.brace.round.ts"
2480 }
2481 },
2482 "end": "\\)",
2483 "endCaptures": {
2484 "0": {
2485 "name": "meta.brace.round.ts"
2486 }
2487 },
2488 "patterns": [
2489 {
2490 "include": "#expression"
2491 }
2492 ]
2493 },
2494 {
2495 "name": "switch-block.expr.ts",
2496 "begin": "\\{",
2497 "beginCaptures": {
2498 "0": {
2499 "name": "punctuation.definition.block.ts"
2500 }
2501 },
2502 "end": "(?=\\})",
2503 "patterns": [
2504 {
2505 "name": "case-clause.expr.ts",
2506 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2507 "beginCaptures": {
2508 "1": {
2509 "name": "keyword.control.switch.ts"
2510 }
2511 },
2512 "end": "(?=:)",
2513 "patterns": [
2514 {
2515 "include": "#expression"
2516 }
2517 ]
2518 },
2519 {
2520 "begin": "(:)\\s*(\\{)",
2521 "beginCaptures": {
2522 "1": {
2523 "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
2524 },
2525 "2": {
2526 "name": "meta.block.ts punctuation.definition.block.ts"
2527 }
2528 },
2529 "end": "\\}",
2530 "endCaptures": {
2531 "0": {
2532 "name": "meta.block.ts punctuation.definition.block.ts"
2533 }
2534 },
2535 "contentName": "meta.block.ts",
2536 "patterns": [
2537 {
2538 "include": "#statements"
2539 }
2540 ]
2541 },
2542 {
2543 "match": "(:)",
2544 "captures": {
2545 "0": {
2546 "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
2547 }
2548 }
2549 },
2550 {
2551 "include": "#statements"
2552 }
2553 ]
2554 }
2555 ]
2556 },
2557 "for-loop": {
2558 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*))await)?\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)?(\\())",
2559 "beginCaptures": {
2560 "0": {
2561 "name": "keyword.control.loop.ts"
2562 }
2563 },
2564 "end": "(?<=\\))",
2565 "patterns": [
2566 {
2567 "include": "#comment"
2568 },
2569 {
2570 "name": "keyword.control.loop.ts",
2571 "match": "await"
2572 },
2573 {
2574 "begin": "\\(",
2575 "beginCaptures": {
2576 "0": {
2577 "name": "meta.brace.round.ts"
2578 }
2579 },
2580 "end": "\\)",
2581 "endCaptures": {
2582 "0": {
2583 "name": "meta.brace.round.ts"
2584 }
2585 },
2586 "patterns": [
2587 {
2588 "include": "#var-expr"
2589 },
2590 {
2591 "include": "#expression"
2592 },
2593 {
2594 "include": "#punctuation-semicolon"
2595 }
2596 ]
2597 }
2598 ]
2599 },
2600 "if-statement": {
2601 "patterns": [
2602 {
2603 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))\\s*(?!\\{))",
2604 "end": "(?=;|$|\\})",
2605 "patterns": [
2606 {
2607 "include": "#comment"
2608 },
2609 {
2610 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()",
2611 "beginCaptures": {
2612 "1": {
2613 "name": "keyword.control.conditional.ts"
2614 },
2615 "2": {
2616 "name": "meta.brace.round.ts"
2617 }
2618 },
2619 "end": "\\)",
2620 "endCaptures": {
2621 "0": {
2622 "name": "meta.brace.round.ts"
2623 }
2624 },
2625 "patterns": [
2626 {
2627 "include": "#expression"
2628 }
2629 ]
2630 },
2631 {
2632 "name": "string.regexp.ts",
2633 "begin": "(?<=\\))\\s*\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
2634 "beginCaptures": {
2635 "0": {
2636 "name": "punctuation.definition.string.begin.ts"
2637 }
2638 },
2639 "end": "(/)([dgimsuy]*)",
2640 "endCaptures": {
2641 "1": {
2642 "name": "punctuation.definition.string.end.ts"
2643 },
2644 "2": {
2645 "name": "keyword.other.ts"
2646 }
2647 },
2648 "patterns": [
2649 {
2650 "include": "#regexp"
2651 }
2652 ]
2653 },
2654 {
2655 "include": "#statements"
2656 }
2657 ]
2658 }
2659 ]
2660 },
2661 "decl-block": {
2662 "name": "meta.block.ts",
2663 "begin": "\\{",
2664 "beginCaptures": {
2665 "0": {
2666 "name": "punctuation.definition.block.ts"
2667 }
2668 },
2669 "end": "\\}",
2670 "endCaptures": {
2671 "0": {
2672 "name": "punctuation.definition.block.ts"
2673 }
2674 },
2675 "patterns": [
2676 {
2677 "include": "#statements"
2678 }
2679 ]
2680 },
2681 "after-operator-block-as-object-literal": {
2682 "name": "meta.objectliteral.ts",
2683 "begin": "(?<!\\+\\+|--)(?<=[:=(,\\[?+!>]|^await|[^\\._$[:alnum:]]await|^return|[^\\._$[:alnum:]]return|^yield|[^\\._$[:alnum:]]yield|^throw|[^\\._$[:alnum:]]throw|^in|[^\\._$[:alnum:]]in|^of|[^\\._$[:alnum:]]of|^typeof|[^\\._$[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
2684 "beginCaptures": {
2685 "1": {
2686 "name": "punctuation.definition.block.ts"
2687 }
2688 },
2689 "end": "\\}",
2690 "endCaptures": {
2691 "0": {
2692 "name": "punctuation.definition.block.ts"
2693 }
2694 },
2695 "patterns": [
2696 {
2697 "include": "#object-member"
2698 }
2699 ]
2700 },
2701 "object-literal": {
2702 "name": "meta.objectliteral.ts",
2703 "begin": "\\{",
2704 "beginCaptures": {
2705 "0": {
2706 "name": "punctuation.definition.block.ts"
2707 }
2708 },
2709 "end": "\\}",
2710 "endCaptures": {
2711 "0": {
2712 "name": "punctuation.definition.block.ts"
2713 }
2714 },
2715 "patterns": [
2716 {
2717 "include": "#object-member"
2718 }
2719 ]
2720 },
2721 "object-member": {
2722 "patterns": [
2723 {
2724 "include": "#comment"
2725 },
2726 {
2727 "include": "#object-literal-method-declaration"
2728 },
2729 {
2730 "name": "meta.object.member.ts meta.object-literal.key.ts",
2731 "begin": "(?=\\[)",
2732 "end": "(?=:)|((?<=[\\]])(?=\\s*[\\(\\<]))",
2733 "patterns": [
2734 {
2735 "include": "#comment"
2736 },
2737 {
2738 "include": "#array-literal"
2739 }
2740 ]
2741 },
2742 {
2743 "name": "meta.object.member.ts meta.object-literal.key.ts",
2744 "begin": "(?=[\\'\\\"\\`])",
2745 "end": "(?=:)|((?<=[\\'\\\"\\`])(?=((\\s*[\\(\\<,}])|(\\s+(as|satisifies)\\s+))))",
2746 "patterns": [
2747 {
2748 "include": "#comment"
2749 },
2750 {
2751 "include": "#string"
2752 }
2753 ]
2754 },
2755 {
2756 "name": "meta.object.member.ts meta.object-literal.key.ts",
2757 "begin": "(?x)(?=(\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$))|(\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)))",
2758 "end": "(?=:)|(?=\\s*([\\(\\<,}])|(\\s+as|satisifies\\s+))",
2759 "patterns": [
2760 {
2761 "include": "#comment"
2762 },
2763 {
2764 "include": "#numeric-literal"
2765 }
2766 ]
2767 },
2768 {
2769 "name": "meta.method.declaration.ts",
2770 "begin": "(?<=[\\]\\'\\\"\\`])(?=\\s*[\\(\\<])",
2771 "end": "(?=\\}|;|,)|(?<=\\})",
2772 "patterns": [
2773 {
2774 "include": "#function-body"
2775 }
2776 ]
2777 },
2778 {
2779 "name": "meta.object.member.ts",
2780 "match": "(?![_$[:alpha:]])([[:digit:]]+)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2781 "captures": {
2782 "0": {
2783 "name": "meta.object-literal.key.ts"
2784 },
2785 "1": {
2786 "name": "constant.numeric.decimal.ts"
2787 }
2788 }
2789 },
2790 {
2791 "name": "meta.object.member.ts",
2792 "match": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:(\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/)*\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
2793 "captures": {
2794 "0": {
2795 "name": "meta.object-literal.key.ts"
2796 },
2797 "1": {
2798 "name": "entity.name.function.ts"
2799 }
2800 }
2801 },
2802 {
2803 "name": "meta.object.member.ts",
2804 "match": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*:)",
2805 "captures": {
2806 "0": {
2807 "name": "meta.object-literal.key.ts"
2808 }
2809 }
2810 },
2811 {
2812 "name": "meta.object.member.ts",
2813 "begin": "\\.\\.\\.",
2814 "beginCaptures": {
2815 "0": {
2816 "name": "keyword.operator.spread.ts"
2817 }
2818 },
2819 "end": "(?=,|\\})",
2820 "patterns": [
2821 {
2822 "include": "#expression"
2823 }
2824 ]
2825 },
2826 {
2827 "name": "meta.object.member.ts",
2828 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$|\\/\\/|\\/\\*)",
2829 "captures": {
2830 "1": {
2831 "name": "variable.other.readwrite.ts"
2832 }
2833 }
2834 },
2835 {
2836 "name": "meta.object.member.ts",
2837 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
2838 "captures": {
2839 "1": {
2840 "name": "keyword.control.as.ts"
2841 },
2842 "2": {
2843 "name": "storage.modifier.ts"
2844 }
2845 }
2846 },
2847 {
2848 "name": "meta.object.member.ts",
2849 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
2850 "beginCaptures": {
2851 "1": {
2852 "name": "keyword.control.as.ts"
2853 },
2854 "2": {
2855 "name": "keyword.control.satisfies.ts"
2856 }
2857 },
2858 "end": "(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|^|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))",
2859 "patterns": [
2860 {
2861 "include": "#type"
2862 }
2863 ]
2864 },
2865 {
2866 "name": "meta.object.member.ts",
2867 "begin": "(?=[_$[:alpha:]][_$[:alnum:]]*\\s*=)",
2868 "end": "(?=,|\\}|$|\\/\\/|\\/\\*)",
2869 "patterns": [
2870 {
2871 "include": "#expression"
2872 }
2873 ]
2874 },
2875 {
2876 "name": "meta.object.member.ts",
2877 "begin": ":",
2878 "beginCaptures": {
2879 "0": {
2880 "name": "meta.object-literal.key.ts punctuation.separator.key-value.ts"
2881 }
2882 },
2883 "end": "(?=,|\\})",
2884 "patterns": [
2885 {
2886 "begin": "(?<=:)\\s*(async)?(?=\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2887 "beginCaptures": {
2888 "1": {
2889 "name": "storage.modifier.async.ts"
2890 }
2891 },
2892 "end": "(?<=\\))",
2893 "patterns": [
2894 {
2895 "include": "#type-parameters"
2896 },
2897 {
2898 "begin": "\\(",
2899 "beginCaptures": {
2900 "0": {
2901 "name": "meta.brace.round.ts"
2902 }
2903 },
2904 "end": "\\)",
2905 "endCaptures": {
2906 "0": {
2907 "name": "meta.brace.round.ts"
2908 }
2909 },
2910 "patterns": [
2911 {
2912 "include": "#expression-inside-possibly-arrow-parens"
2913 }
2914 ]
2915 }
2916 ]
2917 },
2918 {
2919 "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2920 "beginCaptures": {
2921 "1": {
2922 "name": "storage.modifier.async.ts"
2923 },
2924 "2": {
2925 "name": "meta.brace.round.ts"
2926 }
2927 },
2928 "end": "\\)",
2929 "endCaptures": {
2930 "0": {
2931 "name": "meta.brace.round.ts"
2932 }
2933 },
2934 "patterns": [
2935 {
2936 "include": "#expression-inside-possibly-arrow-parens"
2937 }
2938 ]
2939 },
2940 {
2941 "begin": "(?<=:)\\s*(async)?\\s*(?=\\<\\s*$)",
2942 "beginCaptures": {
2943 "1": {
2944 "name": "storage.modifier.async.ts"
2945 }
2946 },
2947 "end": "(?<=\\>)",
2948 "patterns": [
2949 {
2950 "include": "#type-parameters"
2951 }
2952 ]
2953 },
2954 {
2955 "begin": "(?<=\\>)\\s*(\\()(?=\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
2956 "beginCaptures": {
2957 "1": {
2958 "name": "meta.brace.round.ts"
2959 }
2960 },
2961 "end": "\\)",
2962 "endCaptures": {
2963 "0": {
2964 "name": "meta.brace.round.ts"
2965 }
2966 },
2967 "patterns": [
2968 {
2969 "include": "#expression-inside-possibly-arrow-parens"
2970 }
2971 ]
2972 },
2973 {
2974 "include": "#possibly-arrow-return-type"
2975 },
2976 {
2977 "include": "#expression"
2978 }
2979 ]
2980 },
2981 {
2982 "include": "#punctuation-comma"
2983 },
2984 {
2985 "include": "#decl-block"
2986 }
2987 ]
2988 },
2989 "ternary-expression": {
2990 "begin": "(?!\\?\\.\\s*[^[:digit:]])(\\?)(?!\\?)",
2991 "beginCaptures": {
2992 "1": {
2993 "name": "keyword.operator.ternary.ts"
2994 }
2995 },
2996 "end": "\\s*(:)",
2997 "endCaptures": {
2998 "1": {
2999 "name": "keyword.operator.ternary.ts"
3000 }
3001 },
3002 "patterns": [
3003 {
3004 "include": "#expression"
3005 }
3006 ]
3007 },
3008 "function-call": {
3009 "patterns": [
3010 {
3011 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
3012 "end": "(?<=\\))(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
3013 "patterns": [
3014 {
3015 "name": "meta.function-call.ts",
3016 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
3017 "end": "(?=\\s*(?:(\\?\\.\\s*)|(\\!))?((<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?\\())",
3018 "patterns": [
3019 {
3020 "include": "#function-call-target"
3021 }
3022 ]
3023 },
3024 {
3025 "include": "#comment"
3026 },
3027 {
3028 "include": "#function-call-optionals"
3029 },
3030 {
3031 "include": "#type-arguments"
3032 },
3033 {
3034 "include": "#paren-expression"
3035 }
3036 ]
3037 },
3038 {
3039 "begin": "(?=(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
3040 "end": "(?<=\\>)(?!(((([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))|(?<=[\\)]))(<\\s*[\\{\\[\\(]\\s*$))",
3041 "patterns": [
3042 {
3043 "name": "meta.function-call.ts",
3044 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)(\\s*\\??\\.\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*))*)|(\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*))",
3045 "end": "(?=(<\\s*[\\{\\[\\(]\\s*$))",
3046 "patterns": [
3047 {
3048 "include": "#function-call-target"
3049 }
3050 ]
3051 },
3052 {
3053 "include": "#comment"
3054 },
3055 {
3056 "include": "#function-call-optionals"
3057 },
3058 {
3059 "include": "#type-arguments"
3060 }
3061 ]
3062 }
3063 ]
3064 },
3065 "function-call-target": {
3066 "patterns": [
3067 {
3068 "include": "#support-function-call-identifiers"
3069 },
3070 {
3071 "name": "entity.name.function.ts",
3072 "match": "(\\#?[_$[:alpha:]][_$[:alnum:]]*)"
3073 }
3074 ]
3075 },
3076 "function-call-optionals": {
3077 "patterns": [
3078 {
3079 "name": "meta.function-call.ts punctuation.accessor.optional.ts",
3080 "match": "\\?\\."
3081 },
3082 {
3083 "name": "meta.function-call.ts keyword.operator.definiteassignment.ts",
3084 "match": "\\!"
3085 }
3086 ]
3087 },
3088 "support-function-call-identifiers": {
3089 "patterns": [
3090 {
3091 "include": "#literal"
3092 },
3093 {
3094 "include": "#support-objects"
3095 },
3096 {
3097 "include": "#object-identifiers"
3098 },
3099 {
3100 "include": "#punctuation-accessor"
3101 },
3102 {
3103 "name": "keyword.operator.expression.import.ts",
3104 "match": "(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*[\\(]\\s*[\\\"\\'\\`]))"
3105 }
3106 ]
3107 },
3108 "new-expr": {
3109 "name": "new.expr.ts",
3110 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3111 "beginCaptures": {
3112 "1": {
3113 "name": "keyword.operator.new.ts"
3114 }
3115 },
3116 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3117 "patterns": [
3118 {
3119 "include": "#expression"
3120 }
3121 ]
3122 },
3123 "instanceof-expr": {
3124 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3125 "beginCaptures": {
3126 "1": {
3127 "name": "keyword.operator.expression.instanceof.ts"
3128 }
3129 },
3130 "end": "(?<=\\))|(?=[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|(===|!==|==|!=)|(([\\&\\~\\^\\|]\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s+instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[_$[:alpha:]][_$[:alnum:]]*)|(\\s*[\\(]))))",
3131 "patterns": [
3132 {
3133 "include": "#type"
3134 }
3135 ]
3136 },
3137 "paren-expression-possibly-arrow": {
3138 "patterns": [
3139 {
3140 "begin": "(?<=[(=,])\\s*(async)?(?=\\s*((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\(\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))",
3141 "beginCaptures": {
3142 "1": {
3143 "name": "storage.modifier.async.ts"
3144 }
3145 },
3146 "end": "(?<=\\))",
3147 "patterns": [
3148 {
3149 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3150 }
3151 ]
3152 },
3153 {
3154 "begin": "(?<=[(=,]|=>|^return|[^\\._$[:alnum:]]return)\\s*(async)?(?=\\s*((((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*))?\\()|(<)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)))\\s*$)",
3155 "beginCaptures": {
3156 "1": {
3157 "name": "storage.modifier.async.ts"
3158 }
3159 },
3160 "end": "(?<=\\))",
3161 "patterns": [
3162 {
3163 "include": "#paren-expression-possibly-arrow-with-typeparameters"
3164 }
3165 ]
3166 },
3167 {
3168 "include": "#possibly-arrow-return-type"
3169 }
3170 ]
3171 },
3172 "paren-expression-possibly-arrow-with-typeparameters": {
3173 "patterns": [
3174 {
3175 "include": "#type-parameters"
3176 },
3177 {
3178 "begin": "\\(",
3179 "beginCaptures": {
3180 "0": {
3181 "name": "meta.brace.round.ts"
3182 }
3183 },
3184 "end": "\\)",
3185 "endCaptures": {
3186 "0": {
3187 "name": "meta.brace.round.ts"
3188 }
3189 },
3190 "patterns": [
3191 {
3192 "include": "#expression-inside-possibly-arrow-parens"
3193 }
3194 ]
3195 }
3196 ]
3197 },
3198 "expression-inside-possibly-arrow-parens": {
3199 "patterns": [
3200 {
3201 "include": "#expressionWithoutIdentifiers"
3202 },
3203 {
3204 "include": "#comment"
3205 },
3206 {
3207 "include": "#string"
3208 },
3209 {
3210 "include": "#decorator"
3211 },
3212 {
3213 "include": "#destructuring-parameter"
3214 },
3215 {
3216 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)",
3217 "captures": {
3218 "1": {
3219 "name": "storage.modifier.ts"
3220 }
3221 }
3222 },
3223 {
3224 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*\n# function assignment |\n(=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)) |\n# typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>\n(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))) |\n(:\\s*(=>|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(<[^<>]*>)|[^<>(),=])+=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n)))",
3225 "captures": {
3226 "1": {
3227 "name": "storage.modifier.ts"
3228 },
3229 "2": {
3230 "name": "keyword.operator.rest.ts"
3231 },
3232 "3": {
3233 "name": "entity.name.function.ts variable.language.this.ts"
3234 },
3235 "4": {
3236 "name": "entity.name.function.ts"
3237 },
3238 "5": {
3239 "name": "keyword.operator.optional.ts"
3240 }
3241 }
3242 },
3243 {
3244 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[:,]|$)",
3245 "captures": {
3246 "1": {
3247 "name": "storage.modifier.ts"
3248 },
3249 "2": {
3250 "name": "keyword.operator.rest.ts"
3251 },
3252 "3": {
3253 "name": "variable.parameter.ts variable.language.this.ts"
3254 },
3255 "4": {
3256 "name": "variable.parameter.ts"
3257 },
3258 "5": {
3259 "name": "keyword.operator.optional.ts"
3260 }
3261 }
3262 },
3263 {
3264 "include": "#type-annotation"
3265 },
3266 {
3267 "include": "#variable-initializer"
3268 },
3269 {
3270 "name": "punctuation.separator.parameter.ts",
3271 "match": ","
3272 },
3273 {
3274 "include": "#identifiers"
3275 },
3276 {
3277 "include": "#expressionPunctuations"
3278 }
3279 ]
3280 },
3281 "paren-expression": {
3282 "begin": "\\(",
3283 "beginCaptures": {
3284 "0": {
3285 "name": "meta.brace.round.ts"
3286 }
3287 },
3288 "end": "\\)",
3289 "endCaptures": {
3290 "0": {
3291 "name": "meta.brace.round.ts"
3292 }
3293 },
3294 "patterns": [
3295 {
3296 "include": "#expression"
3297 }
3298 ]
3299 },
3300 "cast": {
3301 "patterns": [
3302 {
3303 "name": "cast.expr.ts",
3304 "match": "\\s*(<)\\s*(const)\\s*(>)",
3305 "captures": {
3306 "1": {
3307 "name": "meta.brace.angle.ts"
3308 },
3309 "2": {
3310 "name": "storage.modifier.ts"
3311 },
3312 "3": {
3313 "name": "meta.brace.angle.ts"
3314 }
3315 }
3316 },
3317 {
3318 "name": "cast.expr.ts",
3319 "begin": "(?:(?<!\\+\\+|--)(?<=^return|[^\\._$[:alnum:]]return|^throw|[^\\._$[:alnum:]]throw|^yield|[^\\._$[:alnum:]]yield|^await|[^\\._$[:alnum:]]await|^default|[^\\._$[:alnum:]]default|[=(,:>*?\\&\\|\\^]|[^_$[:alnum:]](?:\\+\\+|\\-\\-)|[^\\+]\\+|[^\\-]\\-))\\s*(<)(?!<?\\=)(?!\\s*$)",
3320 "beginCaptures": {
3321 "1": {
3322 "name": "meta.brace.angle.ts"
3323 }
3324 },
3325 "end": "(\\>)",
3326 "endCaptures": {
3327 "1": {
3328 "name": "meta.brace.angle.ts"
3329 }
3330 },
3331 "patterns": [
3332 {
3333 "include": "#type"
3334 }
3335 ]
3336 },
3337 {
3338 "name": "cast.expr.ts",
3339 "begin": "(?:(?<=^))\\s*(<)(?=[_$[:alpha:]][_$[:alnum:]]*\\s*>)",
3340 "beginCaptures": {
3341 "1": {
3342 "name": "meta.brace.angle.ts"
3343 }
3344 },
3345 "end": "(\\>)",
3346 "endCaptures": {
3347 "1": {
3348 "name": "meta.brace.angle.ts"
3349 }
3350 },
3351 "patterns": [
3352 {
3353 "include": "#type"
3354 }
3355 ]
3356 }
3357 ]
3358 },
3359 "expression-operators": {
3360 "patterns": [
3361 {
3362 "name": "keyword.control.flow.ts",
3363 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3364 },
3365 {
3366 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*\\*)",
3367 "beginCaptures": {
3368 "1": {
3369 "name": "keyword.control.flow.ts"
3370 }
3371 },
3372 "end": "\\*",
3373 "endCaptures": {
3374 "0": {
3375 "name": "keyword.generator.asterisk.ts"
3376 }
3377 },
3378 "patterns": [
3379 {
3380 "include": "#comment"
3381 }
3382 ]
3383 },
3384 {
3385 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?",
3386 "captures": {
3387 "1": {
3388 "name": "keyword.control.flow.ts"
3389 },
3390 "2": {
3391 "name": "keyword.generator.asterisk.ts"
3392 }
3393 }
3394 },
3395 {
3396 "name": "keyword.operator.expression.delete.ts",
3397 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3398 },
3399 {
3400 "name": "keyword.operator.expression.in.ts",
3401 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3402 },
3403 {
3404 "name": "keyword.operator.expression.of.ts",
3405 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()"
3406 },
3407 {
3408 "name": "keyword.operator.expression.instanceof.ts",
3409 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3410 },
3411 {
3412 "name": "keyword.operator.new.ts",
3413 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3414 },
3415 {
3416 "include": "#typeof-operator"
3417 },
3418 {
3419 "name": "keyword.operator.expression.void.ts",
3420 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3421 },
3422 {
3423 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[;,:})\\]]))",
3424 "captures": {
3425 "1": {
3426 "name": "keyword.control.as.ts"
3427 },
3428 "2": {
3429 "name": "storage.modifier.ts"
3430 }
3431 }
3432 },
3433 {
3434 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
3435 "beginCaptures": {
3436 "1": {
3437 "name": "keyword.control.as.ts"
3438 },
3439 "2": {
3440 "name": "keyword.control.satisfies.ts"
3441 }
3442 },
3443 "end": "(?=^|[;),}\\]:?\\-\\+\\>]|\\|\\||\\&\\&|\\!\\=\\=|$|((?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisfies)\\s+)|(\\s+\\<))",
3444 "patterns": [
3445 {
3446 "include": "#type"
3447 }
3448 ]
3449 },
3450 {
3451 "name": "keyword.operator.spread.ts",
3452 "match": "\\.\\.\\."
3453 },
3454 {
3455 "name": "keyword.operator.assignment.compound.ts",
3456 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
3457 },
3458 {
3459 "name": "keyword.operator.assignment.compound.bitwise.ts",
3460 "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
3461 },
3462 {
3463 "name": "keyword.operator.bitwise.shift.ts",
3464 "match": "<<|>>>|>>"
3465 },
3466 {
3467 "name": "keyword.operator.comparison.ts",
3468 "match": "===|!==|==|!="
3469 },
3470 {
3471 "name": "keyword.operator.relational.ts",
3472 "match": "<=|>=|<>|<|>"
3473 },
3474 {
3475 "match": "(?<=[_$[:alnum:]])(\\!)\\s*(?:(/=)|(?:(/)(?![/*])))",
3476 "captures": {
3477 "1": {
3478 "name": "keyword.operator.logical.ts"
3479 },
3480 "2": {
3481 "name": "keyword.operator.assignment.compound.ts"
3482 },
3483 "3": {
3484 "name": "keyword.operator.arithmetic.ts"
3485 }
3486 }
3487 },
3488 {
3489 "name": "keyword.operator.logical.ts",
3490 "match": "\\!|&&|\\|\\||\\?\\?"
3491 },
3492 {
3493 "name": "keyword.operator.bitwise.ts",
3494 "match": "\\&|~|\\^|\\|"
3495 },
3496 {
3497 "name": "keyword.operator.assignment.ts",
3498 "match": "\\="
3499 },
3500 {
3501 "name": "keyword.operator.decrement.ts",
3502 "match": "--"
3503 },
3504 {
3505 "name": "keyword.operator.increment.ts",
3506 "match": "\\+\\+"
3507 },
3508 {
3509 "name": "keyword.operator.arithmetic.ts",
3510 "match": "%|\\*|/|-|\\+"
3511 },
3512 {
3513 "begin": "(?<=[_$[:alnum:])\\]])\\s*(?=(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)+(?:(/=)|(?:(/)(?![/*]))))",
3514 "end": "(?:(/=)|(?:(/)(?!\\*([^\\*]|(\\*[^\\/]))*\\*\\/)))",
3515 "endCaptures": {
3516 "1": {
3517 "name": "keyword.operator.assignment.compound.ts"
3518 },
3519 "2": {
3520 "name": "keyword.operator.arithmetic.ts"
3521 }
3522 },
3523 "patterns": [
3524 {
3525 "include": "#comment"
3526 }
3527 ]
3528 },
3529 {
3530 "match": "(?<=[_$[:alnum:])\\]])\\s*(?:(/=)|(?:(/)(?![/*])))",
3531 "captures": {
3532 "1": {
3533 "name": "keyword.operator.assignment.compound.ts"
3534 },
3535 "2": {
3536 "name": "keyword.operator.arithmetic.ts"
3537 }
3538 }
3539 }
3540 ]
3541 },
3542 "typeof-operator": {
3543 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3544 "beginCaptures": {
3545 "0": {
3546 "name": "keyword.operator.expression.typeof.ts"
3547 }
3548 },
3549 "end": "(?=[,);}\\]=>:&|{\\?]|(extends\\s+)|$|;|^\\s*$|(?:^\\s*(?:abstract|async|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|break|case|catch|class|const|continue|declare|do|else|enum|export|finally|function|for|goto|if|import|interface|let|module|namespace|switch|return|throw|try|type|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|var|while)\\b))",
3550 "patterns": [
3551 {
3552 "include": "#type-arguments"
3553 },
3554 {
3555 "include": "#expression"
3556 }
3557 ]
3558 },
3559 "literal": {
3560 "patterns": [
3561 {
3562 "include": "#numeric-literal"
3563 },
3564 {
3565 "include": "#boolean-literal"
3566 },
3567 {
3568 "include": "#null-literal"
3569 },
3570 {
3571 "include": "#undefined-literal"
3572 },
3573 {
3574 "include": "#numericConstant-literal"
3575 },
3576 {
3577 "include": "#array-literal"
3578 },
3579 {
3580 "include": "#this-literal"
3581 },
3582 {
3583 "include": "#super-literal"
3584 }
3585 ]
3586 },
3587 "array-literal": {
3588 "name": "meta.array.literal.ts",
3589 "begin": "\\s*(\\[)",
3590 "beginCaptures": {
3591 "1": {
3592 "name": "meta.brace.square.ts"
3593 }
3594 },
3595 "end": "\\]",
3596 "endCaptures": {
3597 "0": {
3598 "name": "meta.brace.square.ts"
3599 }
3600 },
3601 "patterns": [
3602 {
3603 "include": "#expression"
3604 },
3605 {
3606 "include": "#punctuation-comma"
3607 }
3608 ]
3609 },
3610 "numeric-literal": {
3611 "patterns": [
3612 {
3613 "name": "constant.numeric.hex.ts",
3614 "match": "\\b(?<!\\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\\b(?!\\$)",
3615 "captures": {
3616 "1": {
3617 "name": "storage.type.numeric.bigint.ts"
3618 }
3619 }
3620 },
3621 {
3622 "name": "constant.numeric.binary.ts",
3623 "match": "\\b(?<!\\$)0(?:b|B)[01][01_]*(n)?\\b(?!\\$)",
3624 "captures": {
3625 "1": {
3626 "name": "storage.type.numeric.bigint.ts"
3627 }
3628 }
3629 },
3630 {
3631 "name": "constant.numeric.octal.ts",
3632 "match": "\\b(?<!\\$)0(?:o|O)?[0-7][0-7_]*(n)?\\b(?!\\$)",
3633 "captures": {
3634 "1": {
3635 "name": "storage.type.numeric.bigint.ts"
3636 }
3637 }
3638 },
3639 {
3640 "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.1E+3\n (?:\\b[0-9][0-9_]*(\\.)[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1.E+3\n (?:\\B(\\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # .1E+3\n (?:\\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\\b)| # 1E+3\n (?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b)| # 1.1\n (?:\\b[0-9][0-9_]*(\\.)(n)?\\B)| # 1.\n (?:\\B(\\.)[0-9][0-9_]*(n)?\\b)| # .1\n (?:\\b[0-9][0-9_]*(n)?\\b(?!\\.)) # 1\n)(?!\\$)",
3641 "captures": {
3642 "0": {
3643 "name": "constant.numeric.decimal.ts"
3644 },
3645 "1": {
3646 "name": "meta.delimiter.decimal.period.ts"
3647 },
3648 "2": {
3649 "name": "storage.type.numeric.bigint.ts"
3650 },
3651 "3": {
3652 "name": "meta.delimiter.decimal.period.ts"
3653 },
3654 "4": {
3655 "name": "storage.type.numeric.bigint.ts"
3656 },
3657 "5": {
3658 "name": "meta.delimiter.decimal.period.ts"
3659 },
3660 "6": {
3661 "name": "storage.type.numeric.bigint.ts"
3662 },
3663 "7": {
3664 "name": "storage.type.numeric.bigint.ts"
3665 },
3666 "8": {
3667 "name": "meta.delimiter.decimal.period.ts"
3668 },
3669 "9": {
3670 "name": "storage.type.numeric.bigint.ts"
3671 },
3672 "10": {
3673 "name": "meta.delimiter.decimal.period.ts"
3674 },
3675 "11": {
3676 "name": "storage.type.numeric.bigint.ts"
3677 },
3678 "12": {
3679 "name": "meta.delimiter.decimal.period.ts"
3680 },
3681 "13": {
3682 "name": "storage.type.numeric.bigint.ts"
3683 },
3684 "14": {
3685 "name": "storage.type.numeric.bigint.ts"
3686 }
3687 }
3688 }
3689 ]
3690 },
3691 "boolean-literal": {
3692 "patterns": [
3693 {
3694 "name": "constant.language.boolean.true.ts",
3695 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3696 },
3697 {
3698 "name": "constant.language.boolean.false.ts",
3699 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3700 }
3701 ]
3702 },
3703 "null-literal": {
3704 "name": "constant.language.null.ts",
3705 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3706 },
3707 "this-literal": {
3708 "name": "variable.language.this.ts",
3709 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)"
3710 },
3711 "super-literal": {
3712 "name": "variable.language.super.ts",
3713 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)"
3714 },
3715 "undefined-literal": {
3716 "name": "constant.language.undefined.ts",
3717 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3718 },
3719 "numericConstant-literal": {
3720 "patterns": [
3721 {
3722 "name": "constant.language.nan.ts",
3723 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3724 },
3725 {
3726 "name": "constant.language.infinity.ts",
3727 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
3728 }
3729 ]
3730 },
3731 "support-objects": {
3732 "patterns": [
3733 {
3734 "name": "variable.language.arguments.ts",
3735 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)"
3736 },
3737 {
3738 "name": "support.class.promise.ts",
3739 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)"
3740 },
3741 {
3742 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(meta)\\b(?!\\$)",
3743 "captures": {
3744 "1": {
3745 "name": "keyword.control.import.ts"
3746 },
3747 "2": {
3748 "name": "punctuation.accessor.ts"
3749 },
3750 "3": {
3751 "name": "punctuation.accessor.optional.ts"
3752 },
3753 "4": {
3754 "name": "support.variable.property.importmeta.ts"
3755 }
3756 }
3757 },
3758 {
3759 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(target)\\b(?!\\$)",
3760 "captures": {
3761 "1": {
3762 "name": "keyword.operator.new.ts"
3763 },
3764 "2": {
3765 "name": "punctuation.accessor.ts"
3766 },
3767 "3": {
3768 "name": "punctuation.accessor.optional.ts"
3769 },
3770 "4": {
3771 "name": "support.variable.property.target.ts"
3772 }
3773 }
3774 },
3775 {
3776 "match": "(?x) (?:(\\.)|(\\?\\.(?!\\s*[[:digit:]]))) \\s* (?:\n (?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\\())\n |\n (?:(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$)))",
3777 "captures": {
3778 "1": {
3779 "name": "punctuation.accessor.ts"
3780 },
3781 "2": {
3782 "name": "punctuation.accessor.optional.ts"
3783 },
3784 "3": {
3785 "name": "support.variable.property.ts"
3786 },
3787 "4": {
3788 "name": "support.constant.ts"
3789 }
3790 }
3791 },
3792 {
3793 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
3794 "captures": {
3795 "1": {
3796 "name": "support.type.object.module.ts"
3797 },
3798 "2": {
3799 "name": "support.type.object.module.ts"
3800 },
3801 "3": {
3802 "name": "punctuation.accessor.ts"
3803 },
3804 "4": {
3805 "name": "punctuation.accessor.optional.ts"
3806 },
3807 "5": {
3808 "name": "support.type.object.module.ts"
3809 }
3810 }
3811 }
3812 ]
3813 },
3814 "identifiers": {
3815 "patterns": [
3816 {
3817 "include": "#object-identifiers"
3818 },
3819 {
3820 "match": "(?x)(?:(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*(\n ((async\\s+)?(\n (function\\s*[(<*]) |\n (function\\s+) |\n ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)\n )) |\n ((async\\s*)?(\n ((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))))) |\n # sure shot arrow functions even if => is on new line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?\n [(]\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*\n (\n ([)]\\s*:) | # ():\n ((\\.\\.\\.\\s*)?[_$[:alpha:]][_$[:alnum:]]*\\s*:) # [(]param: | [(]...param:\n )\n) |\n\n# arrow function possible to detect only with => on same line\n(\n (<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)? # typeparameters\n \\(\\s*(\\/\\*([^\\*]|(\\*[^\\/]))*\\*\\/\\s*)*(([_$[:alpha:]]|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\.\\.\\.\\s*[_$[:alpha:]]))([^()\\'\\\"\\`]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))*)?\\) # parameters\n (\\s*:\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+)? # return type\n \\s*=> # arrow operator\n)\n ))\n))",
3821 "captures": {
3822 "1": {
3823 "name": "punctuation.accessor.ts"
3824 },
3825 "2": {
3826 "name": "punctuation.accessor.optional.ts"
3827 },
3828 "3": {
3829 "name": "entity.name.function.ts"
3830 }
3831 }
3832 },
3833 {
3834 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
3835 "captures": {
3836 "1": {
3837 "name": "punctuation.accessor.ts"
3838 },
3839 "2": {
3840 "name": "punctuation.accessor.optional.ts"
3841 },
3842 "3": {
3843 "name": "variable.other.constant.property.ts"
3844 }
3845 }
3846 },
3847 {
3848 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3849 "captures": {
3850 "1": {
3851 "name": "punctuation.accessor.ts"
3852 },
3853 "2": {
3854 "name": "punctuation.accessor.optional.ts"
3855 },
3856 "3": {
3857 "name": "variable.other.property.ts"
3858 }
3859 }
3860 },
3861 {
3862 "name": "variable.other.constant.ts",
3863 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3864 },
3865 {
3866 "name": "variable.other.readwrite.ts",
3867 "match": "[_$[:alpha:]][_$[:alnum:]]*"
3868 }
3869 ]
3870 },
3871 "object-identifiers": {
3872 "patterns": [
3873 {
3874 "name": "support.class.ts",
3875 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))"
3876 },
3877 {
3878 "match": "(?x)(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(?:\n (\\#?[[:upper:]][_$[:digit:][:upper:]]*) |\n (\\#?[_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3879 "captures": {
3880 "1": {
3881 "name": "punctuation.accessor.ts"
3882 },
3883 "2": {
3884 "name": "punctuation.accessor.optional.ts"
3885 },
3886 "3": {
3887 "name": "variable.other.constant.object.property.ts"
3888 },
3889 "4": {
3890 "name": "variable.other.object.property.ts"
3891 }
3892 }
3893 },
3894 {
3895 "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\??\\.\\s*\\#?[_$[:alpha:]][_$[:alnum:]]*)",
3896 "captures": {
3897 "1": {
3898 "name": "variable.other.constant.object.ts"
3899 },
3900 "2": {
3901 "name": "variable.other.object.ts"
3902 }
3903 }
3904 }
3905 ]
3906 },
3907 "type-annotation": {
3908 "patterns": [
3909 {
3910 "name": "meta.type.annotation.ts",
3911 "begin": "(:)(?=\\s*\\S)",
3912 "beginCaptures": {
3913 "1": {
3914 "name": "keyword.operator.type.annotation.ts"
3915 }
3916 },
3917 "end": "(?<![:|&])(?!\\s*[|&]\\s+)((?=^|[,);\\}\\]]|//)|(?==[^>])|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3918 "patterns": [
3919 {
3920 "include": "#type"
3921 }
3922 ]
3923 },
3924 {
3925 "name": "meta.type.annotation.ts",
3926 "begin": "(:)",
3927 "beginCaptures": {
3928 "1": {
3929 "name": "keyword.operator.type.annotation.ts"
3930 }
3931 },
3932 "end": "(?<![:|&])((?=[,);\\}\\]]|\\/\\/)|(?==[^>])|(?=^\\s*$)|((?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)))",
3933 "patterns": [
3934 {
3935 "include": "#type"
3936 }
3937 ]
3938 }
3939 ]
3940 },
3941 "parameter-type-annotation": {
3942 "patterns": [
3943 {
3944 "name": "meta.type.annotation.ts",
3945 "begin": "(:)",
3946 "beginCaptures": {
3947 "1": {
3948 "name": "keyword.operator.type.annotation.ts"
3949 }
3950 },
3951 "end": "(?=[,)])|(?==[^>])",
3952 "patterns": [
3953 {
3954 "include": "#type"
3955 }
3956 ]
3957 }
3958 ]
3959 },
3960 "return-type": {
3961 "patterns": [
3962 {
3963 "name": "meta.return.type.ts",
3964 "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
3965 "beginCaptures": {
3966 "1": {
3967 "name": "keyword.operator.type.annotation.ts"
3968 }
3969 },
3970 "end": "(?<![:|&])(?=$|^|[{};,]|//)",
3971 "patterns": [
3972 {
3973 "include": "#return-type-core"
3974 }
3975 ]
3976 },
3977 {
3978 "name": "meta.return.type.ts",
3979 "begin": "(?<=\\))\\s*(:)",
3980 "beginCaptures": {
3981 "1": {
3982 "name": "keyword.operator.type.annotation.ts"
3983 }
3984 },
3985 "end": "(?<![:|&])((?=[{};,]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
3986 "patterns": [
3987 {
3988 "include": "#return-type-core"
3989 }
3990 ]
3991 }
3992 ]
3993 },
3994 "return-type-core": {
3995 "patterns": [
3996 {
3997 "include": "#comment"
3998 },
3999 {
4000 "begin": "(?<=[:|&])(?=\\s*\\{)",
4001 "end": "(?<=\\})",
4002 "patterns": [
4003 {
4004 "include": "#type-object"
4005 }
4006 ]
4007 },
4008 {
4009 "include": "#type-predicate-operator"
4010 },
4011 {
4012 "include": "#type"
4013 }
4014 ]
4015 },
4016 "arrow-return-type": {
4017 "name": "meta.return.type.arrow.ts",
4018 "begin": "(?<=\\))\\s*(:)",
4019 "beginCaptures": {
4020 "1": {
4021 "name": "keyword.operator.type.annotation.ts"
4022 }
4023 },
4024 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
4025 "patterns": [
4026 {
4027 "include": "#arrow-return-type-body"
4028 }
4029 ]
4030 },
4031 "possibly-arrow-return-type": {
4032 "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*=>)",
4033 "beginCaptures": {
4034 "1": {
4035 "name": "meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts"
4036 }
4037 },
4038 "end": "(?==>|\\{|(^\\s*(export|function|class|interface|let|var|(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)|(?:\\bawait\\s+(?:\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[_$[:alpha:]])\\b)\\b)|const|import|enum|namespace|module|type|abstract|declare)\\s+))",
4039 "contentName": "meta.arrow.ts meta.return.type.arrow.ts",
4040 "patterns": [
4041 {
4042 "include": "#arrow-return-type-body"
4043 }
4044 ]
4045 },
4046 "arrow-return-type-body": {
4047 "patterns": [
4048 {
4049 "begin": "(?<=[:])(?=\\s*\\{)",
4050 "end": "(?<=\\})",
4051 "patterns": [
4052 {
4053 "include": "#type-object"
4054 }
4055 ]
4056 },
4057 {
4058 "include": "#type-predicate-operator"
4059 },
4060 {
4061 "include": "#type"
4062 }
4063 ]
4064 },
4065 "type-parameters": {
4066 "name": "meta.type.parameters.ts",
4067 "begin": "(<)",
4068 "beginCaptures": {
4069 "1": {
4070 "name": "punctuation.definition.typeparameters.begin.ts"
4071 }
4072 },
4073 "end": "(>)",
4074 "endCaptures": {
4075 "1": {
4076 "name": "punctuation.definition.typeparameters.end.ts"
4077 }
4078 },
4079 "patterns": [
4080 {
4081 "include": "#comment"
4082 },
4083 {
4084 "name": "storage.modifier.ts",
4085 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4086 },
4087 {
4088 "include": "#type"
4089 },
4090 {
4091 "include": "#punctuation-comma"
4092 },
4093 {
4094 "name": "keyword.operator.assignment.ts",
4095 "match": "(=)(?!>)"
4096 }
4097 ]
4098 },
4099 "type-arguments": {
4100 "name": "meta.type.parameters.ts",
4101 "begin": "\\<",
4102 "beginCaptures": {
4103 "0": {
4104 "name": "punctuation.definition.typeparameters.begin.ts"
4105 }
4106 },
4107 "end": "\\>",
4108 "endCaptures": {
4109 "0": {
4110 "name": "punctuation.definition.typeparameters.end.ts"
4111 }
4112 },
4113 "patterns": [
4114 {
4115 "include": "#type-arguments-body"
4116 }
4117 ]
4118 },
4119 "type-arguments-body": {
4120 "patterns": [
4121 {
4122 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4123 "captures": {
4124 "0": {
4125 "name": "keyword.operator.type.ts"
4126 }
4127 }
4128 },
4129 {
4130 "include": "#type"
4131 },
4132 {
4133 "include": "#punctuation-comma"
4134 }
4135 ]
4136 },
4137 "type": {
4138 "patterns": [
4139 {
4140 "include": "#comment"
4141 },
4142 {
4143 "include": "#type-string"
4144 },
4145 {
4146 "include": "#numeric-literal"
4147 },
4148 {
4149 "include": "#type-primitive"
4150 },
4151 {
4152 "include": "#type-builtin-literals"
4153 },
4154 {
4155 "include": "#type-parameters"
4156 },
4157 {
4158 "include": "#type-tuple"
4159 },
4160 {
4161 "include": "#type-object"
4162 },
4163 {
4164 "include": "#type-operators"
4165 },
4166 {
4167 "include": "#type-conditional"
4168 },
4169 {
4170 "include": "#type-fn-type-parameters"
4171 },
4172 {
4173 "include": "#type-paren-or-function-parameters"
4174 },
4175 {
4176 "include": "#type-function-return-type"
4177 },
4178 {
4179 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
4180 "captures": {
4181 "1": {
4182 "name": "storage.modifier.ts"
4183 }
4184 }
4185 },
4186 {
4187 "include": "#type-name"
4188 }
4189 ]
4190 },
4191 "type-primitive": {
4192 "name": "support.type.primitive.ts",
4193 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4194 },
4195 "type-builtin-literals": {
4196 "name": "support.type.builtin.ts",
4197 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4198 },
4199 "type-tuple": {
4200 "name": "meta.type.tuple.ts",
4201 "begin": "\\[",
4202 "beginCaptures": {
4203 "0": {
4204 "name": "meta.brace.square.ts"
4205 }
4206 },
4207 "end": "\\]",
4208 "endCaptures": {
4209 "0": {
4210 "name": "meta.brace.square.ts"
4211 }
4212 },
4213 "patterns": [
4214 {
4215 "name": "keyword.operator.rest.ts",
4216 "match": "\\.\\.\\."
4217 },
4218 {
4219 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\?)?\\s*(:)",
4220 "captures": {
4221 "1": {
4222 "name": "entity.name.label.ts"
4223 },
4224 "2": {
4225 "name": "keyword.operator.optional.ts"
4226 },
4227 "3": {
4228 "name": "punctuation.separator.label.ts"
4229 }
4230 }
4231 },
4232 {
4233 "include": "#type"
4234 },
4235 {
4236 "include": "#punctuation-comma"
4237 }
4238 ]
4239 },
4240 "type-object": {
4241 "name": "meta.object.type.ts",
4242 "begin": "\\{",
4243 "beginCaptures": {
4244 "0": {
4245 "name": "punctuation.definition.block.ts"
4246 }
4247 },
4248 "end": "\\}",
4249 "endCaptures": {
4250 "0": {
4251 "name": "punctuation.definition.block.ts"
4252 }
4253 },
4254 "patterns": [
4255 {
4256 "include": "#comment"
4257 },
4258 {
4259 "include": "#method-declaration"
4260 },
4261 {
4262 "include": "#indexer-declaration"
4263 },
4264 {
4265 "include": "#indexer-mapped-type-declaration"
4266 },
4267 {
4268 "include": "#field-declaration"
4269 },
4270 {
4271 "include": "#type-annotation"
4272 },
4273 {
4274 "begin": "\\.\\.\\.",
4275 "beginCaptures": {
4276 "0": {
4277 "name": "keyword.operator.spread.ts"
4278 }
4279 },
4280 "end": "(?=\\}|;|,|$)|(?<=\\})",
4281 "patterns": [
4282 {
4283 "include": "#type"
4284 }
4285 ]
4286 },
4287 {
4288 "include": "#punctuation-comma"
4289 },
4290 {
4291 "include": "#punctuation-semicolon"
4292 },
4293 {
4294 "include": "#type"
4295 }
4296 ]
4297 },
4298 "type-conditional": {
4299 "patterns": [
4300 {
4301 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
4302 "beginCaptures": {
4303 "1": {
4304 "name": "storage.modifier.ts"
4305 }
4306 },
4307 "end": "(?<=:)",
4308 "patterns": [
4309 {
4310 "begin": "\\?",
4311 "beginCaptures": {
4312 "0": {
4313 "name": "keyword.operator.ternary.ts"
4314 }
4315 },
4316 "end": ":",
4317 "endCaptures": {
4318 "0": {
4319 "name": "keyword.operator.ternary.ts"
4320 }
4321 },
4322 "patterns": [
4323 {
4324 "include": "#type"
4325 }
4326 ]
4327 },
4328 {
4329 "include": "#type"
4330 }
4331 ]
4332 }
4333 ]
4334 },
4335 "type-paren-or-function-parameters": {
4336 "name": "meta.type.paren.cover.ts",
4337 "begin": "\\(",
4338 "beginCaptures": {
4339 "0": {
4340 "name": "meta.brace.round.ts"
4341 }
4342 },
4343 "end": "\\)",
4344 "endCaptures": {
4345 "0": {
4346 "name": "meta.brace.round.ts"
4347 }
4348 },
4349 "patterns": [
4350 {
4351 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*(\n (<) |\n ([(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n ))\n)) |\n(:\\s*(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))) |\n(:\\s*((<\\s*$)|((<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<]|\\<\\s*(((const\\s+)?[_$[:alpha:]])|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\]))([^=<>]|=[^<])*\\>)*\\>)*>\\s*)?[\\(]\\s*((([\\{\\[]\\s*)?$)|((\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})\\s*((:\\s*\\{?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*)))|((\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])\\s*((:\\s*\\[?$)|((\\s*([^<>\\(\\)\\{\\}]|\\<([^<>]|\\<([^<>]|\\<[^<>]+\\>)+\\>)+\\>|\\([^\\(\\)]+\\)|\\{[^\\{\\}]+\\})+\\s*)?=\\s*))))))))",
4352 "captures": {
4353 "1": {
4354 "name": "storage.modifier.ts"
4355 },
4356 "2": {
4357 "name": "keyword.operator.rest.ts"
4358 },
4359 "3": {
4360 "name": "entity.name.function.ts variable.language.this.ts"
4361 },
4362 "4": {
4363 "name": "entity.name.function.ts"
4364 },
4365 "5": {
4366 "name": "keyword.operator.optional.ts"
4367 }
4368 }
4369 },
4370 {
4371 "match": "(?x)(?:(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s*(\\??)(?=:)",
4372 "captures": {
4373 "1": {
4374 "name": "storage.modifier.ts"
4375 },
4376 "2": {
4377 "name": "keyword.operator.rest.ts"
4378 },
4379 "3": {
4380 "name": "variable.parameter.ts variable.language.this.ts"
4381 },
4382 "4": {
4383 "name": "variable.parameter.ts"
4384 },
4385 "5": {
4386 "name": "keyword.operator.optional.ts"
4387 }
4388 }
4389 },
4390 {
4391 "include": "#type-annotation"
4392 },
4393 {
4394 "name": "punctuation.separator.parameter.ts",
4395 "match": ","
4396 },
4397 {
4398 "include": "#type"
4399 }
4400 ]
4401 },
4402 "type-fn-type-parameters": {
4403 "patterns": [
4404 {
4405 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*\\<)",
4406 "beginCaptures": {
4407 "1": {
4408 "name": "meta.type.constructor.ts storage.modifier.ts"
4409 },
4410 "2": {
4411 "name": "meta.type.constructor.ts keyword.control.new.ts"
4412 }
4413 },
4414 "end": "(?<=>)",
4415 "patterns": [
4416 {
4417 "include": "#comment"
4418 },
4419 {
4420 "include": "#type-parameters"
4421 }
4422 ]
4423 },
4424 {
4425 "name": "meta.type.constructor.ts",
4426 "begin": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
4427 "beginCaptures": {
4428 "1": {
4429 "name": "storage.modifier.ts"
4430 },
4431 "2": {
4432 "name": "keyword.control.new.ts"
4433 }
4434 },
4435 "end": "(?<=\\))",
4436 "patterns": [
4437 {
4438 "include": "#function-parameters"
4439 }
4440 ]
4441 },
4442 {
4443 "name": "meta.type.function.ts",
4444 "begin": "(?x)(\n (?=\n [(]\\s*(\n ([)]) |\n (\\.\\.\\.) |\n ([_$[:alnum:]]+\\s*(\n ([:,?=])|\n ([)]\\s*=>)\n ))\n )\n )\n)",
4445 "end": "(?<=\\))",
4446 "patterns": [
4447 {
4448 "include": "#function-parameters"
4449 }
4450 ]
4451 }
4452 ]
4453 },
4454 "type-function-return-type": {
4455 "patterns": [
4456 {
4457 "name": "meta.type.function.return.ts",
4458 "begin": "(=>)(?=\\s*\\S)",
4459 "beginCaptures": {
4460 "1": {
4461 "name": "storage.type.function.arrow.ts"
4462 }
4463 },
4464 "end": "(?<!=>)(?<![|&])(?=[,\\]\\)\\{\\}=;>:\\?]|//|$)",
4465 "patterns": [
4466 {
4467 "include": "#type-function-return-type-core"
4468 }
4469 ]
4470 },
4471 {
4472 "name": "meta.type.function.return.ts",
4473 "begin": "=>",
4474 "beginCaptures": {
4475 "0": {
4476 "name": "storage.type.function.arrow.ts"
4477 }
4478 },
4479 "end": "(?<!=>)(?<![|&])((?=[,\\]\\)\\{\\}=;:\\?>]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4480 "patterns": [
4481 {
4482 "include": "#type-function-return-type-core"
4483 }
4484 ]
4485 }
4486 ]
4487 },
4488 "type-function-return-type-core": {
4489 "patterns": [
4490 {
4491 "include": "#comment"
4492 },
4493 {
4494 "begin": "(?<==>)(?=\\s*\\{)",
4495 "end": "(?<=\\})",
4496 "patterns": [
4497 {
4498 "include": "#type-object"
4499 }
4500 ]
4501 },
4502 {
4503 "include": "#type-predicate-operator"
4504 },
4505 {
4506 "include": "#type"
4507 }
4508 ]
4509 },
4510 "type-operators": {
4511 "patterns": [
4512 {
4513 "include": "#typeof-operator"
4514 },
4515 {
4516 "include": "#type-infer"
4517 },
4518 {
4519 "begin": "([&|])(?=\\s*\\{)",
4520 "beginCaptures": {
4521 "0": {
4522 "name": "keyword.operator.type.ts"
4523 }
4524 },
4525 "end": "(?<=\\})",
4526 "patterns": [
4527 {
4528 "include": "#type-object"
4529 }
4530 ]
4531 },
4532 {
4533 "begin": "[&|]",
4534 "beginCaptures": {
4535 "0": {
4536 "name": "keyword.operator.type.ts"
4537 }
4538 },
4539 "end": "(?=\\S)"
4540 },
4541 {
4542 "name": "keyword.operator.expression.keyof.ts",
4543 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4544 },
4545 {
4546 "name": "keyword.operator.ternary.ts",
4547 "match": "(\\?|\\:)"
4548 },
4549 {
4550 "name": "keyword.operator.expression.import.ts",
4551 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()"
4552 }
4553 ]
4554 },
4555 "type-infer": {
4556 "patterns": [
4557 {
4558 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
4559 "name": "meta.type.infer.ts",
4560 "captures": {
4561 "1": {
4562 "name": "keyword.operator.expression.infer.ts"
4563 },
4564 "2": {
4565 "name": "entity.name.type.ts"
4566 },
4567 "3": {
4568 "name": "keyword.operator.expression.extends.ts"
4569 }
4570 }
4571 }
4572 ]
4573 },
4574 "type-predicate-operator": {
4575 "patterns": [
4576 {
4577 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\\s(is)(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4578 "captures": {
4579 "1": {
4580 "name": "keyword.operator.type.asserts.ts"
4581 },
4582 "2": {
4583 "name": "variable.parameter.ts variable.language.this.ts"
4584 },
4585 "3": {
4586 "name": "variable.parameter.ts"
4587 },
4588 "4": {
4589 "name": "keyword.operator.expression.is.ts"
4590 }
4591 }
4592 },
4593 {
4594 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4595 "captures": {
4596 "1": {
4597 "name": "keyword.operator.type.asserts.ts"
4598 },
4599 "2": {
4600 "name": "variable.parameter.ts variable.language.this.ts"
4601 },
4602 "3": {
4603 "name": "variable.parameter.ts"
4604 }
4605 }
4606 },
4607 {
4608 "name": "keyword.operator.type.asserts.ts",
4609 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4610 },
4611 {
4612 "name": "keyword.operator.expression.is.ts",
4613 "match": "(?<![_$[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![_$[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4614 }
4615 ]
4616 },
4617 "type-name": {
4618 "patterns": [
4619 {
4620 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))\\s*(<)",
4621 "captures": {
4622 "1": {
4623 "name": "entity.name.type.module.ts"
4624 },
4625 "2": {
4626 "name": "punctuation.accessor.ts"
4627 },
4628 "3": {
4629 "name": "punctuation.accessor.optional.ts"
4630 },
4631 "4": {
4632 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
4633 }
4634 },
4635 "end": "(>)",
4636 "endCaptures": {
4637 "1": {
4638 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
4639 }
4640 },
4641 "contentName": "meta.type.parameters.ts",
4642 "patterns": [
4643 {
4644 "include": "#type-arguments-body"
4645 }
4646 ]
4647 },
4648 {
4649 "begin": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(<)",
4650 "beginCaptures": {
4651 "1": {
4652 "name": "entity.name.type.ts"
4653 },
4654 "2": {
4655 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
4656 }
4657 },
4658 "end": "(>)",
4659 "endCaptures": {
4660 "1": {
4661 "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
4662 }
4663 },
4664 "contentName": "meta.type.parameters.ts",
4665 "patterns": [
4666 {
4667 "include": "#type-arguments-body"
4668 }
4669 ]
4670 },
4671 {
4672 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4673 "captures": {
4674 "1": {
4675 "name": "entity.name.type.module.ts"
4676 },
4677 "2": {
4678 "name": "punctuation.accessor.ts"
4679 },
4680 "3": {
4681 "name": "punctuation.accessor.optional.ts"
4682 }
4683 }
4684 },
4685 {
4686 "name": "entity.name.type.ts",
4687 "match": "[_$[:alpha:]][_$[:alnum:]]*"
4688 }
4689 ]
4690 },
4691 "punctuation-comma": {
4692 "name": "punctuation.separator.comma.ts",
4693 "match": ","
4694 },
4695 "punctuation-semicolon": {
4696 "name": "punctuation.terminator.statement.ts",
4697 "match": ";"
4698 },
4699 "punctuation-accessor": {
4700 "match": "(?:(\\.)|(\\?\\.(?!\\s*[[:digit:]])))",
4701 "captures": {
4702 "1": {
4703 "name": "punctuation.accessor.ts"
4704 },
4705 "2": {
4706 "name": "punctuation.accessor.optional.ts"
4707 }
4708 }
4709 },
4710 "string": {
4711 "patterns": [
4712 {
4713 "include": "#qstring-single"
4714 },
4715 {
4716 "include": "#qstring-double"
4717 },
4718 {
4719 "include": "#template"
4720 }
4721 ]
4722 },
4723 "qstring-double": {
4724 "name": "string.quoted.double.ts",
4725 "begin": "\"",
4726 "beginCaptures": {
4727 "0": {
4728 "name": "punctuation.definition.string.begin.ts"
4729 }
4730 },
4731 "end": "(\")|((?:[^\\\\\\n])$)",
4732 "endCaptures": {
4733 "1": {
4734 "name": "punctuation.definition.string.end.ts"
4735 },
4736 "2": {
4737 "name": "invalid.illegal.newline.ts"
4738 }
4739 },
4740 "patterns": [
4741 {
4742 "include": "#string-character-escape"
4743 }
4744 ]
4745 },
4746 "qstring-single": {
4747 "name": "string.quoted.single.ts",
4748 "begin": "'",
4749 "beginCaptures": {
4750 "0": {
4751 "name": "punctuation.definition.string.begin.ts"
4752 }
4753 },
4754 "end": "(\\')|((?:[^\\\\\\n])$)",
4755 "endCaptures": {
4756 "1": {
4757 "name": "punctuation.definition.string.end.ts"
4758 },
4759 "2": {
4760 "name": "invalid.illegal.newline.ts"
4761 }
4762 },
4763 "patterns": [
4764 {
4765 "include": "#string-character-escape"
4766 }
4767 ]
4768 },
4769 "string-character-escape": {
4770 "name": "constant.character.escape.ts",
4771 "match": "\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}|u\\{[0-9A-Fa-f]+\\}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
4772 },
4773 "template": {
4774 "patterns": [
4775 {
4776 "include": "#template-call"
4777 },
4778 {
4779 "contentName": "string.template.ts",
4780 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4781 "beginCaptures": {
4782 "1": {
4783 "name": "entity.name.function.tagged-template.ts"
4784 },
4785 "2": {
4786 "name": "string.template.ts punctuation.definition.string.template.begin.ts"
4787 }
4788 },
4789 "end": "`",
4790 "endCaptures": {
4791 "0": {
4792 "name": "string.template.ts punctuation.definition.string.template.end.ts"
4793 }
4794 },
4795 "patterns": [
4796 {
4797 "include": "#template-substitution-element"
4798 },
4799 {
4800 "include": "#string-character-escape"
4801 }
4802 ]
4803 }
4804 ]
4805 },
4806 "template-call": {
4807 "patterns": [
4808 {
4809 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*)(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)",
4810 "end": "(?=`)",
4811 "patterns": [
4812 {
4813 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([_$[:alpha:]][_$[:alnum:]]*))",
4814 "end": "(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)?`)",
4815 "patterns": [
4816 {
4817 "include": "#support-function-call-identifiers"
4818 },
4819 {
4820 "name": "entity.name.function.tagged-template.ts",
4821 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
4822 }
4823 ]
4824 },
4825 {
4826 "include": "#type-arguments"
4827 }
4828 ]
4829 },
4830 {
4831 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?\\s*(?=(<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))(([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>|\\<\\s*(((keyof|infer|typeof|readonly)\\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\\{([^\\{\\}]|(\\{([^\\{\\}]|\\{[^\\{\\}]*\\})*\\}))*\\})|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(\\[([^\\[\\]]|(\\[([^\\[\\]]|\\[[^\\[\\]]*\\])*\\]))*\\])|(\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`))(?=\\s*([\\<\\>\\,\\.\\[]|=>|&(?!&)|\\|(?!\\|)))))([^<>\\(]|(\\(([^\\(\\)]|(\\(([^\\(\\)]|\\([^\\(\\)]*\\))*\\)))*\\))|(?<==)\\>)*(?<!=)\\>))*(?<!=)\\>)*(?<!=)>\\s*)`)",
4832 "beginCaptures": {
4833 "1": {
4834 "name": "entity.name.function.tagged-template.ts"
4835 }
4836 },
4837 "end": "(?=`)",
4838 "patterns": [
4839 {
4840 "include": "#type-arguments"
4841 }
4842 ]
4843 }
4844 ]
4845 },
4846 "template-substitution-element": {
4847 "name": "meta.template.expression.ts",
4848 "begin": "\\$\\{",
4849 "beginCaptures": {
4850 "0": {
4851 "name": "punctuation.definition.template-expression.begin.ts"
4852 }
4853 },
4854 "end": "\\}",
4855 "endCaptures": {
4856 "0": {
4857 "name": "punctuation.definition.template-expression.end.ts"
4858 }
4859 },
4860 "patterns": [
4861 {
4862 "include": "#expression"
4863 }
4864 ],
4865 "contentName": "meta.embedded.line.ts"
4866 },
4867 "type-string": {
4868 "patterns": [
4869 {
4870 "include": "#qstring-single"
4871 },
4872 {
4873 "include": "#qstring-double"
4874 },
4875 {
4876 "include": "#template-type"
4877 }
4878 ]
4879 },
4880 "template-type": {
4881 "patterns": [
4882 {
4883 "include": "#template-call"
4884 },
4885 {
4886 "contentName": "string.template.ts",
4887 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
4888 "beginCaptures": {
4889 "1": {
4890 "name": "entity.name.function.tagged-template.ts"
4891 },
4892 "2": {
4893 "name": "string.template.ts punctuation.definition.string.template.begin.ts"
4894 }
4895 },
4896 "end": "`",
4897 "endCaptures": {
4898 "0": {
4899 "name": "string.template.ts punctuation.definition.string.template.end.ts"
4900 }
4901 },
4902 "patterns": [
4903 {
4904 "include": "#template-type-substitution-element"
4905 },
4906 {
4907 "include": "#string-character-escape"
4908 }
4909 ]
4910 }
4911 ]
4912 },
4913 "template-type-substitution-element": {
4914 "name": "meta.template.expression.ts",
4915 "begin": "\\$\\{",
4916 "beginCaptures": {
4917 "0": {
4918 "name": "punctuation.definition.template-expression.begin.ts"
4919 }
4920 },
4921 "end": "\\}",
4922 "endCaptures": {
4923 "0": {
4924 "name": "punctuation.definition.template-expression.end.ts"
4925 }
4926 },
4927 "patterns": [
4928 {
4929 "include": "#type"
4930 }
4931 ],
4932 "contentName": "meta.embedded.line.ts"
4933 },
4934 "regex": {
4935 "patterns": [
4936 {
4937 "name": "string.regexp.ts",
4938 "begin": "(?<!\\+\\+|--|})(?<=[=(:,\\[?+!]|^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case|=>|&&|\\|\\||\\*\\/)\\s*(\\/)(?![\\/*])(?=(?:[^\\/\\\\\\[\\()]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\]|\\(([^\\)\\\\]|\\\\.)+\\))+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4939 "beginCaptures": {
4940 "1": {
4941 "name": "punctuation.definition.string.begin.ts"
4942 }
4943 },
4944 "end": "(/)([dgimsuy]*)",
4945 "endCaptures": {
4946 "1": {
4947 "name": "punctuation.definition.string.end.ts"
4948 },
4949 "2": {
4950 "name": "keyword.other.ts"
4951 }
4952 },
4953 "patterns": [
4954 {
4955 "include": "#regexp"
4956 }
4957 ]
4958 },
4959 {
4960 "name": "string.regexp.ts",
4961 "begin": "((?<![_$[:alnum:])\\]]|\\+\\+|--|}|\\*\\/)|((?<=^return|[^\\._$[:alnum:]]return|^case|[^\\._$[:alnum:]]case))\\s*)\\/(?![\\/*])(?=(?:[^\\/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)*\\])+\\/([dgimsuy]+|(?![\\/\\*])|(?=\\/\\*))(?!\\s*[a-zA-Z0-9_$]))",
4962 "beginCaptures": {
4963 "0": {
4964 "name": "punctuation.definition.string.begin.ts"
4965 }
4966 },
4967 "end": "(/)([dgimsuy]*)",
4968 "endCaptures": {
4969 "1": {
4970 "name": "punctuation.definition.string.end.ts"
4971 },
4972 "2": {
4973 "name": "keyword.other.ts"
4974 }
4975 },
4976 "patterns": [
4977 {
4978 "include": "#regexp"
4979 }
4980 ]
4981 }
4982 ]
4983 },
4984 "regexp": {
4985 "patterns": [
4986 {
4987 "name": "keyword.control.anchor.regexp",
4988 "match": "\\\\[bB]|\\^|\\$"
4989 },
4990 {
4991 "match": "\\\\[1-9]\\d*|\\\\k<([a-zA-Z_$][\\w$]*)>",
4992 "captures": {
4993 "0": {
4994 "name": "keyword.other.back-reference.regexp"
4995 },
4996 "1": {
4997 "name": "variable.other.regexp"
4998 }
4999 }
5000 },
5001 {
5002 "name": "keyword.operator.quantifier.regexp",
5003 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
5004 },
5005 {
5006 "name": "keyword.operator.or.regexp",
5007 "match": "\\|"
5008 },
5009 {
5010 "name": "meta.group.assertion.regexp",
5011 "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
5012 "beginCaptures": {
5013 "1": {
5014 "name": "punctuation.definition.group.regexp"
5015 },
5016 "2": {
5017 "name": "punctuation.definition.group.assertion.regexp"
5018 },
5019 "3": {
5020 "name": "meta.assertion.look-ahead.regexp"
5021 },
5022 "4": {
5023 "name": "meta.assertion.negative-look-ahead.regexp"
5024 },
5025 "5": {
5026 "name": "meta.assertion.look-behind.regexp"
5027 },
5028 "6": {
5029 "name": "meta.assertion.negative-look-behind.regexp"
5030 }
5031 },
5032 "end": "(\\))",
5033 "endCaptures": {
5034 "1": {
5035 "name": "punctuation.definition.group.regexp"
5036 }
5037 },
5038 "patterns": [
5039 {
5040 "include": "#regexp"
5041 }
5042 ]
5043 },
5044 {
5045 "name": "meta.group.regexp",
5046 "begin": "\\((?:(\\?:)|(?:\\?<([a-zA-Z_$][\\w$]*)>))?",
5047 "beginCaptures": {
5048 "0": {
5049 "name": "punctuation.definition.group.regexp"
5050 },
5051 "1": {
5052 "name": "punctuation.definition.group.no-capture.regexp"
5053 },
5054 "2": {
5055 "name": "variable.other.regexp"
5056 }
5057 },
5058 "end": "\\)",
5059 "endCaptures": {
5060 "0": {
5061 "name": "punctuation.definition.group.regexp"
5062 }
5063 },
5064 "patterns": [
5065 {
5066 "include": "#regexp"
5067 }
5068 ]
5069 },
5070 {
5071 "name": "constant.other.character-class.set.regexp",
5072 "begin": "(\\[)(\\^)?",
5073 "beginCaptures": {
5074 "1": {
5075 "name": "punctuation.definition.character-class.regexp"
5076 },
5077 "2": {
5078 "name": "keyword.operator.negation.regexp"
5079 }
5080 },
5081 "end": "(\\])",
5082 "endCaptures": {
5083 "1": {
5084 "name": "punctuation.definition.character-class.regexp"
5085 }
5086 },
5087 "patterns": [
5088 {
5089 "name": "constant.other.character-class.range.regexp",
5090 "match": "(?:.|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\\\c[A-Z])|(\\\\.))",
5091 "captures": {
5092 "1": {
5093 "name": "constant.character.numeric.regexp"
5094 },
5095 "2": {
5096 "name": "constant.character.control.regexp"
5097 },
5098 "3": {
5099 "name": "constant.character.escape.backslash.regexp"
5100 },
5101 "4": {
5102 "name": "constant.character.numeric.regexp"
5103 },
5104 "5": {
5105 "name": "constant.character.control.regexp"
5106 },
5107 "6": {
5108 "name": "constant.character.escape.backslash.regexp"
5109 }
5110 }
5111 },
5112 {
5113 "include": "#regex-character-class"
5114 }
5115 ]
5116 },
5117 {
5118 "include": "#regex-character-class"
5119 }
5120 ]
5121 },
5122 "regex-character-class": {
5123 "patterns": [
5124 {
5125 "name": "constant.other.character-class.regexp",
5126 "match": "\\\\[wWsSdDtrnvf]|\\."
5127 },
5128 {
5129 "name": "constant.character.numeric.regexp",
5130 "match": "\\\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})"
5131 },
5132 {
5133 "name": "constant.character.control.regexp",
5134 "match": "\\\\c[A-Z]"
5135 },
5136 {
5137 "name": "constant.character.escape.backslash.regexp",
5138 "match": "\\\\."
5139 }
5140 ]
5141 },
5142 "comment": {
5143 "patterns": [
5144 {
5145 "name": "comment.block.documentation.ts",
5146 "begin": "/\\*\\*(?!/)",
5147 "beginCaptures": {
5148 "0": {
5149 "name": "punctuation.definition.comment.ts"
5150 }
5151 },
5152 "end": "\\*/",
5153 "endCaptures": {
5154 "0": {
5155 "name": "punctuation.definition.comment.ts"
5156 }
5157 },
5158 "patterns": [
5159 {
5160 "include": "#docblock"
5161 }
5162 ]
5163 },
5164 {
5165 "name": "comment.block.ts",
5166 "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
5167 "beginCaptures": {
5168 "1": {
5169 "name": "punctuation.definition.comment.ts"
5170 },
5171 "2": {
5172 "name": "storage.type.internaldeclaration.ts"
5173 },
5174 "3": {
5175 "name": "punctuation.decorator.internaldeclaration.ts"
5176 }
5177 },
5178 "end": "\\*/",
5179 "endCaptures": {
5180 "0": {
5181 "name": "punctuation.definition.comment.ts"
5182 }
5183 }
5184 },
5185 {
5186 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5187 "beginCaptures": {
5188 "1": {
5189 "name": "punctuation.whitespace.comment.leading.ts"
5190 },
5191 "2": {
5192 "name": "comment.line.double-slash.ts"
5193 },
5194 "3": {
5195 "name": "punctuation.definition.comment.ts"
5196 },
5197 "4": {
5198 "name": "storage.type.internaldeclaration.ts"
5199 },
5200 "5": {
5201 "name": "punctuation.decorator.internaldeclaration.ts"
5202 }
5203 },
5204 "end": "(?=$)",
5205 "contentName": "comment.line.double-slash.ts"
5206 }
5207 ]
5208 },
5209 "single-line-comment-consuming-line-ending": {
5210 "begin": "(^[ \\t]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
5211 "beginCaptures": {
5212 "1": {
5213 "name": "punctuation.whitespace.comment.leading.ts"
5214 },
5215 "2": {
5216 "name": "comment.line.double-slash.ts"
5217 },
5218 "3": {
5219 "name": "punctuation.definition.comment.ts"
5220 },
5221 "4": {
5222 "name": "storage.type.internaldeclaration.ts"
5223 },
5224 "5": {
5225 "name": "punctuation.decorator.internaldeclaration.ts"
5226 }
5227 },
5228 "end": "(?=^)",
5229 "contentName": "comment.line.double-slash.ts"
5230 },
5231 "directives": {
5232 "name": "comment.line.triple-slash.directive.ts",
5233 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*((\\'([^\\'\\\\]|\\\\.)*\\')|(\\\"([^\\\"\\\\]|\\\\.)*\\\")|(\\`([^\\`\\\\]|\\\\.)*\\`)))+\\s*/>\\s*$)",
5234 "beginCaptures": {
5235 "1": {
5236 "name": "punctuation.definition.comment.ts"
5237 }
5238 },
5239 "end": "(?=$)",
5240 "patterns": [
5241 {
5242 "name": "meta.tag.ts",
5243 "begin": "(<)(reference|amd-dependency|amd-module)",
5244 "beginCaptures": {
5245 "1": {
5246 "name": "punctuation.definition.tag.directive.ts"
5247 },
5248 "2": {
5249 "name": "entity.name.tag.directive.ts"
5250 }
5251 },
5252 "end": "/>",
5253 "endCaptures": {
5254 "0": {
5255 "name": "punctuation.definition.tag.directive.ts"
5256 }
5257 },
5258 "patterns": [
5259 {
5260 "name": "entity.other.attribute-name.directive.ts",
5261 "match": "path|types|no-default-lib|lib|name|resolution-mode"
5262 },
5263 {
5264 "name": "keyword.operator.assignment.ts",
5265 "match": "="
5266 },
5267 {
5268 "include": "#string"
5269 }
5270 ]
5271 }
5272 ]
5273 },
5274 "docblock": {
5275 "patterns": [
5276 {
5277 "match": "(?x)\n((@)(?:access|api))\n\\s+\n(private|protected|public)\n\\b",
5278 "captures": {
5279 "1": {
5280 "name": "storage.type.class.jsdoc"
5281 },
5282 "2": {
5283 "name": "punctuation.definition.block.tag.jsdoc"
5284 },
5285 "3": {
5286 "name": "constant.language.access-type.jsdoc"
5287 }
5288 }
5289 },
5290 {
5291 "match": "(?x)\n((@)author)\n\\s+\n(\n [^@\\s<>*/]\n (?:[^@<>*/]|\\*[^/])*\n)\n(?:\n \\s*\n (<)\n ([^>\\s]+)\n (>)\n)?",
5292 "captures": {
5293 "1": {
5294 "name": "storage.type.class.jsdoc"
5295 },
5296 "2": {
5297 "name": "punctuation.definition.block.tag.jsdoc"
5298 },
5299 "3": {
5300 "name": "entity.name.type.instance.jsdoc"
5301 },
5302 "4": {
5303 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5304 },
5305 "5": {
5306 "name": "constant.other.email.link.underline.jsdoc"
5307 },
5308 "6": {
5309 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5310 }
5311 }
5312 },
5313 {
5314 "match": "(?x)\n((@)borrows) \\s+\n((?:[^@\\s*/]|\\*[^/])+) # <that namepath>\n\\s+ (as) \\s+ # as\n((?:[^@\\s*/]|\\*[^/])+) # <this namepath>",
5315 "captures": {
5316 "1": {
5317 "name": "storage.type.class.jsdoc"
5318 },
5319 "2": {
5320 "name": "punctuation.definition.block.tag.jsdoc"
5321 },
5322 "3": {
5323 "name": "entity.name.type.instance.jsdoc"
5324 },
5325 "4": {
5326 "name": "keyword.operator.control.jsdoc"
5327 },
5328 "5": {
5329 "name": "entity.name.type.instance.jsdoc"
5330 }
5331 }
5332 },
5333 {
5334 "name": "meta.example.jsdoc",
5335 "begin": "((@)example)\\s+",
5336 "end": "(?=@|\\*/)",
5337 "beginCaptures": {
5338 "1": {
5339 "name": "storage.type.class.jsdoc"
5340 },
5341 "2": {
5342 "name": "punctuation.definition.block.tag.jsdoc"
5343 }
5344 },
5345 "patterns": [
5346 {
5347 "match": "^\\s\\*\\s+"
5348 },
5349 {
5350 "contentName": "constant.other.description.jsdoc",
5351 "begin": "\\G(<)caption(>)",
5352 "beginCaptures": {
5353 "0": {
5354 "name": "entity.name.tag.inline.jsdoc"
5355 },
5356 "1": {
5357 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5358 },
5359 "2": {
5360 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5361 }
5362 },
5363 "end": "(</)caption(>)|(?=\\*/)",
5364 "endCaptures": {
5365 "0": {
5366 "name": "entity.name.tag.inline.jsdoc"
5367 },
5368 "1": {
5369 "name": "punctuation.definition.bracket.angle.begin.jsdoc"
5370 },
5371 "2": {
5372 "name": "punctuation.definition.bracket.angle.end.jsdoc"
5373 }
5374 }
5375 },
5376 {
5377 "match": "[^\\s@*](?:[^*]|\\*[^/])*",
5378 "captures": {
5379 "0": {
5380 "name": "source.embedded.ts"
5381 }
5382 }
5383 }
5384 ]
5385 },
5386 {
5387 "match": "(?x) ((@)kind) \\s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \\b",
5388 "captures": {
5389 "1": {
5390 "name": "storage.type.class.jsdoc"
5391 },
5392 "2": {
5393 "name": "punctuation.definition.block.tag.jsdoc"
5394 },
5395 "3": {
5396 "name": "constant.language.symbol-type.jsdoc"
5397 }
5398 }
5399 },
5400 {
5401 "match": "(?x)\n((@)see)\n\\s+\n(?:\n # URL\n (\n (?=https?://)\n (?:[^\\s*]|\\*[^/])+\n )\n |\n # JSDoc namepath\n (\n (?!\n # Avoid matching bare URIs (also acceptable as links)\n https?://\n |\n # Avoid matching {@inline tags}; we match those below\n (?:\\[[^\\[\\]]*\\])? # Possible description [preceding]{@tag}\n {@(?:link|linkcode|linkplain|tutorial)\\b\n )\n # Matched namepath\n (?:[^@\\s*/]|\\*[^/])+\n )\n)",
5402 "captures": {
5403 "1": {
5404 "name": "storage.type.class.jsdoc"
5405 },
5406 "2": {
5407 "name": "punctuation.definition.block.tag.jsdoc"
5408 },
5409 "3": {
5410 "name": "variable.other.link.underline.jsdoc"
5411 },
5412 "4": {
5413 "name": "entity.name.type.instance.jsdoc"
5414 }
5415 }
5416 },
5417 {
5418 "match": "(?x)\n((@)template)\n\\s+\n# One or more valid identifiers\n(\n [A-Za-z_$] # First character: non-numeric word character\n [\\w$.\\[\\]]* # Rest of identifier\n (?: # Possible list of additional identifiers\n \\s* , \\s*\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n )*\n)",
5419 "captures": {
5420 "1": {
5421 "name": "storage.type.class.jsdoc"
5422 },
5423 "2": {
5424 "name": "punctuation.definition.block.tag.jsdoc"
5425 },
5426 "3": {
5427 "name": "variable.other.jsdoc"
5428 }
5429 }
5430 },
5431 {
5432 "begin": "(?x)((@)template)\\s+(?={)",
5433 "beginCaptures": {
5434 "1": {
5435 "name": "storage.type.class.jsdoc"
5436 },
5437 "2": {
5438 "name": "punctuation.definition.block.tag.jsdoc"
5439 }
5440 },
5441 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5442 "patterns": [
5443 {
5444 "include": "#jsdoctype"
5445 },
5446 {
5447 "name": "variable.other.jsdoc",
5448 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5449 }
5450 ]
5451 },
5452 {
5453 "match": "(?x)\n(\n (@)\n (?:arg|argument|const|constant|member|namespace|param|var)\n)\n\\s+\n(\n [A-Za-z_$]\n [\\w$.\\[\\]]*\n)",
5454 "captures": {
5455 "1": {
5456 "name": "storage.type.class.jsdoc"
5457 },
5458 "2": {
5459 "name": "punctuation.definition.block.tag.jsdoc"
5460 },
5461 "3": {
5462 "name": "variable.other.jsdoc"
5463 }
5464 }
5465 },
5466 {
5467 "begin": "((@)typedef)\\s+(?={)",
5468 "beginCaptures": {
5469 "1": {
5470 "name": "storage.type.class.jsdoc"
5471 },
5472 "2": {
5473 "name": "punctuation.definition.block.tag.jsdoc"
5474 }
5475 },
5476 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5477 "patterns": [
5478 {
5479 "include": "#jsdoctype"
5480 },
5481 {
5482 "name": "entity.name.type.instance.jsdoc",
5483 "match": "(?:[^@\\s*/]|\\*[^/])+"
5484 }
5485 ]
5486 },
5487 {
5488 "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?={)",
5489 "beginCaptures": {
5490 "1": {
5491 "name": "storage.type.class.jsdoc"
5492 },
5493 "2": {
5494 "name": "punctuation.definition.block.tag.jsdoc"
5495 }
5496 },
5497 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5498 "patterns": [
5499 {
5500 "include": "#jsdoctype"
5501 },
5502 {
5503 "name": "variable.other.jsdoc",
5504 "match": "([A-Za-z_$][\\w$.\\[\\]]*)"
5505 },
5506 {
5507 "name": "variable.other.jsdoc",
5508 "match": "(?x)\n(\\[)\\s*\n[\\w$]+\n(?:\n (?:\\[\\])? # Foo[ ].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [\\w$]+\n)*\n(?:\n \\s*\n (=) # [foo=bar] Default parameter value\n \\s*\n (\n # The inner regexes are to stop the match early at */ and to not stop at escaped quotes\n (?>\n \"(?:(?:\\*(?!/))|(?:\\\\(?!\"))|[^*\\\\])*?\" | # [foo=\"bar\"] Double-quoted\n '(?:(?:\\*(?!/))|(?:\\\\(?!'))|[^*\\\\])*?' | # [foo='bar'] Single-quoted\n \\[ (?:(?:\\*(?!/))|[^*])*? \\] | # [foo=[1,2]] Array literal\n (?:(?:\\*(?!/))|\\s(?!\\s*\\])|\\[.*?(?:\\]|(?=\\*/))|[^*\\s\\[\\]])* # Everything else\n )*\n )\n)?\n\\s*(?:(\\])((?:[^*\\s]|\\*[^\\s/])+)?|(?=\\*/))",
5509 "captures": {
5510 "1": {
5511 "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
5512 },
5513 "2": {
5514 "name": "keyword.operator.assignment.jsdoc"
5515 },
5516 "3": {
5517 "name": "source.embedded.ts"
5518 },
5519 "4": {
5520 "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
5521 },
5522 "5": {
5523 "name": "invalid.illegal.syntax.jsdoc"
5524 }
5525 }
5526 }
5527 ]
5528 },
5529 {
5530 "begin": "(?x)\n(\n (@)\n (?:define|enum|exception|export|extends|lends|implements|modifies\n |namespace|private|protected|returns?|satisfies|suppress|this|throws|type\n |yields?)\n)\n\\s+(?={)",
5531 "beginCaptures": {
5532 "1": {
5533 "name": "storage.type.class.jsdoc"
5534 },
5535 "2": {
5536 "name": "punctuation.definition.block.tag.jsdoc"
5537 }
5538 },
5539 "end": "(?=\\s|\\*/|[^{}\\[\\]A-Za-z_$])",
5540 "patterns": [
5541 {
5542 "include": "#jsdoctype"
5543 }
5544 ]
5545 },
5546 {
5547 "match": "(?x)\n(\n (@)\n (?:alias|augments|callback|constructs|emits|event|fires|exports?\n |extends|external|function|func|host|lends|listens|interface|memberof!?\n |method|module|mixes|mixin|name|requires|see|this|typedef|uses)\n)\n\\s+\n(\n (?:\n [^{}@\\s*] | \\*[^/]\n )+\n)",
5548 "captures": {
5549 "1": {
5550 "name": "storage.type.class.jsdoc"
5551 },
5552 "2": {
5553 "name": "punctuation.definition.block.tag.jsdoc"
5554 },
5555 "3": {
5556 "name": "entity.name.type.instance.jsdoc"
5557 }
5558 }
5559 },
5560 {
5561 "contentName": "variable.other.jsdoc",
5562 "begin": "((@)(?:default(?:value)?|license|version))\\s+(([''\"]))",
5563 "beginCaptures": {
5564 "1": {
5565 "name": "storage.type.class.jsdoc"
5566 },
5567 "2": {
5568 "name": "punctuation.definition.block.tag.jsdoc"
5569 },
5570 "3": {
5571 "name": "variable.other.jsdoc"
5572 },
5573 "4": {
5574 "name": "punctuation.definition.string.begin.jsdoc"
5575 }
5576 },
5577 "end": "(\\3)|(?=$|\\*/)",
5578 "endCaptures": {
5579 "0": {
5580 "name": "variable.other.jsdoc"
5581 },
5582 "1": {
5583 "name": "punctuation.definition.string.end.jsdoc"
5584 }
5585 }
5586 },
5587 {
5588 "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^\\s*]+)",
5589 "captures": {
5590 "1": {
5591 "name": "storage.type.class.jsdoc"
5592 },
5593 "2": {
5594 "name": "punctuation.definition.block.tag.jsdoc"
5595 },
5596 "3": {
5597 "name": "variable.other.jsdoc"
5598 }
5599 }
5600 },
5601 {
5602 "name": "storage.type.class.jsdoc",
5603 "match": "(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \\b",
5604 "captures": {
5605 "1": {
5606 "name": "punctuation.definition.block.tag.jsdoc"
5607 }
5608 }
5609 },
5610 {
5611 "include": "#inline-tags"
5612 },
5613 {
5614 "match": "((@)(?:[_$[:alpha:]][_$[:alnum:]]*))(?=\\s+)",
5615 "captures": {
5616 "1": {
5617 "name": "storage.type.class.jsdoc"
5618 },
5619 "2": {
5620 "name": "punctuation.definition.block.tag.jsdoc"
5621 }
5622 }
5623 }
5624 ]
5625 },
5626 "brackets": {
5627 "patterns": [
5628 {
5629 "begin": "{",
5630 "end": "}|(?=\\*/)",
5631 "patterns": [
5632 {
5633 "include": "#brackets"
5634 }
5635 ]
5636 },
5637 {
5638 "begin": "\\[",
5639 "end": "\\]|(?=\\*/)",
5640 "patterns": [
5641 {
5642 "include": "#brackets"
5643 }
5644 ]
5645 }
5646 ]
5647 },
5648 "inline-tags": {
5649 "patterns": [
5650 {
5651 "name": "constant.other.description.jsdoc",
5652 "match": "(\\[)[^\\]]+(\\])(?={@(?:link|linkcode|linkplain|tutorial))",
5653 "captures": {
5654 "1": {
5655 "name": "punctuation.definition.bracket.square.begin.jsdoc"
5656 },
5657 "2": {
5658 "name": "punctuation.definition.bracket.square.end.jsdoc"
5659 }
5660 }
5661 },
5662 {
5663 "name": "entity.name.type.instance.jsdoc",
5664 "begin": "({)((@)(?:link(?:code|plain)?|tutorial))\\s*",
5665 "beginCaptures": {
5666 "1": {
5667 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5668 },
5669 "2": {
5670 "name": "storage.type.class.jsdoc"
5671 },
5672 "3": {
5673 "name": "punctuation.definition.inline.tag.jsdoc"
5674 }
5675 },
5676 "end": "}|(?=\\*/)",
5677 "endCaptures": {
5678 "0": {
5679 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5680 }
5681 },
5682 "patterns": [
5683 {
5684 "match": "\\G((?=https?://)(?:[^|}\\s*]|\\*[/])+)(\\|)?",
5685 "captures": {
5686 "1": {
5687 "name": "variable.other.link.underline.jsdoc"
5688 },
5689 "2": {
5690 "name": "punctuation.separator.pipe.jsdoc"
5691 }
5692 }
5693 },
5694 {
5695 "match": "\\G((?:[^{}@\\s|*]|\\*[^/])+)(\\|)?",
5696 "captures": {
5697 "1": {
5698 "name": "variable.other.description.jsdoc"
5699 },
5700 "2": {
5701 "name": "punctuation.separator.pipe.jsdoc"
5702 }
5703 }
5704 }
5705 ]
5706 }
5707 ]
5708 },
5709 "jsdoctype": {
5710 "patterns": [
5711 {
5712 "contentName": "entity.name.type.instance.jsdoc",
5713 "begin": "\\G({)",
5714 "beginCaptures": {
5715 "0": {
5716 "name": "entity.name.type.instance.jsdoc"
5717 },
5718 "1": {
5719 "name": "punctuation.definition.bracket.curly.begin.jsdoc"
5720 }
5721 },
5722 "end": "((}))\\s*|(?=\\*/)",
5723 "endCaptures": {
5724 "1": {
5725 "name": "entity.name.type.instance.jsdoc"
5726 },
5727 "2": {
5728 "name": "punctuation.definition.bracket.curly.end.jsdoc"
5729 }
5730 },
5731 "patterns": [
5732 {
5733 "include": "#brackets"
5734 }
5735 ]
5736 }
5737 ]
5738 }
5739 }
5740 }
5741