crates/highlight/syntaxes/typescript.json 224.8 KiB raw
1
{
2
  "displayName": "TypeScript",
3
  "name": "typescript",
4
  "patterns": [
5
    {
6
      "include": "#directives"
7
    },
8
    {
9
      "include": "#statements"
10
    },
11
    {
12
      "include": "#shebang"
13
    }
14
  ],
15
  "repository": {
16
    "access-modifier": {
17
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(abstract|declare|override|public|protected|private|readonly|static)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
18
      "name": "storage.modifier.ts"
19
    },
20
    "after-operator-block-as-object-literal": {
21
      "begin": "(?<!\\+\\+|--)(?<=[!(+,:=>?\\[]|^await|[^$._[:alnum:]]await|^return|[^$._[:alnum:]]return|^yield|[^$._[:alnum:]]yield|^throw|[^$._[:alnum:]]throw|^in|[^$._[:alnum:]]in|^of|[^$._[:alnum:]]of|^typeof|[^$._[:alnum:]]typeof|&&|\\|\\||\\*)\\s*(\\{)",
22
      "beginCaptures": {
23
        "1": {
24
          "name": "punctuation.definition.block.ts"
25
        }
26
      },
27
      "end": "}",
28
      "endCaptures": {
29
        "0": {
30
          "name": "punctuation.definition.block.ts"
31
        }
32
      },
33
      "name": "meta.objectliteral.ts",
34
      "patterns": [
35
        {
36
          "include": "#object-member"
37
        }
38
      ]
39
    },
40
    "array-binding-pattern": {
41
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
42
      "beginCaptures": {
43
        "1": {
44
          "name": "keyword.operator.rest.ts"
45
        },
46
        "2": {
47
          "name": "punctuation.definition.binding-pattern.array.ts"
48
        }
49
      },
50
      "end": "]",
51
      "endCaptures": {
52
        "0": {
53
          "name": "punctuation.definition.binding-pattern.array.ts"
54
        }
55
      },
56
      "patterns": [
57
        {
58
          "include": "#binding-element"
59
        },
60
        {
61
          "include": "#punctuation-comma"
62
        }
63
      ]
64
    },
65
    "array-binding-pattern-const": {
66
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
67
      "beginCaptures": {
68
        "1": {
69
          "name": "keyword.operator.rest.ts"
70
        },
71
        "2": {
72
          "name": "punctuation.definition.binding-pattern.array.ts"
73
        }
74
      },
75
      "end": "]",
76
      "endCaptures": {
77
        "0": {
78
          "name": "punctuation.definition.binding-pattern.array.ts"
79
        }
80
      },
81
      "patterns": [
82
        {
83
          "include": "#binding-element-const"
84
        },
85
        {
86
          "include": "#punctuation-comma"
87
        }
88
      ]
89
    },
90
    "array-literal": {
91
      "begin": "\\s*(\\[)",
92
      "beginCaptures": {
93
        "1": {
94
          "name": "meta.brace.square.ts"
95
        }
96
      },
97
      "end": "]",
98
      "endCaptures": {
99
        "0": {
100
          "name": "meta.brace.square.ts"
101
        }
102
      },
103
      "name": "meta.array.literal.ts",
104
      "patterns": [
105
        {
106
          "include": "#expression"
107
        },
108
        {
109
          "include": "#punctuation-comma"
110
        }
111
      ]
112
    },
113
    "arrow-function": {
114
      "patterns": [
115
        {
116
          "captures": {
117
            "1": {
118
              "name": "storage.modifier.async.ts"
119
            },
120
            "2": {
121
              "name": "variable.parameter.ts"
122
            }
123
          },
124
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\b(async)\\s+)?([$_[:alpha:]][$_[:alnum:]]*)\\s*(?==>)",
125
          "name": "meta.arrow.ts"
126
        },
127
        {
128
          "begin": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\b(async))?((?<![]!)}])\\s*(?=((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))",
129
          "beginCaptures": {
130
            "1": {
131
              "name": "storage.modifier.async.ts"
132
            }
133
          },
134
          "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+))",
135
          "name": "meta.arrow.ts",
136
          "patterns": [
137
            {
138
              "include": "#comment"
139
            },
140
            {
141
              "include": "#type-parameters"
142
            },
143
            {
144
              "include": "#function-parameters"
145
            },
146
            {
147
              "include": "#arrow-return-type"
148
            },
149
            {
150
              "include": "#possibly-arrow-return-type"
151
            }
152
          ]
153
        },
154
        {
155
          "begin": "=>",
156
          "beginCaptures": {
157
            "0": {
158
              "name": "storage.type.function.arrow.ts"
159
            }
160
          },
161
          "end": "((?<=[}\\S])(?<!=>)|((?!\\{)(?=\\S)))(?!/[*/])",
162
          "name": "meta.arrow.ts",
163
          "patterns": [
164
            {
165
              "include": "#single-line-comment-consuming-line-ending"
166
            },
167
            {
168
              "include": "#decl-block"
169
            },
170
            {
171
              "include": "#expression"
172
            }
173
          ]
174
        }
175
      ]
176
    },
177
    "arrow-return-type": {
178
      "begin": "(?<=\\))\\s*(:)",
179
      "beginCaptures": {
180
        "1": {
181
          "name": "keyword.operator.type.annotation.ts"
182
        }
183
      },
184
      "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+))",
185
      "name": "meta.return.type.arrow.ts",
186
      "patterns": [
187
        {
188
          "include": "#arrow-return-type-body"
189
        }
190
      ]
191
    },
192
    "arrow-return-type-body": {
193
      "patterns": [
194
        {
195
          "begin": "(?<=:)(?=\\s*\\{)",
196
          "end": "(?<=})",
197
          "patterns": [
198
            {
199
              "include": "#type-object"
200
            }
201
          ]
202
        },
203
        {
204
          "include": "#type-predicate-operator"
205
        },
206
        {
207
          "include": "#type"
208
        }
209
      ]
210
    },
211
    "async-modifier": {
212
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(async)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
213
      "name": "storage.modifier.async.ts"
214
    },
215
    "binding-element": {
216
      "patterns": [
217
        {
218
          "include": "#comment"
219
        },
220
        {
221
          "include": "#string"
222
        },
223
        {
224
          "include": "#numeric-literal"
225
        },
226
        {
227
          "include": "#regex"
228
        },
229
        {
230
          "include": "#object-binding-pattern"
231
        },
232
        {
233
          "include": "#array-binding-pattern"
234
        },
235
        {
236
          "include": "#destructuring-variable-rest"
237
        },
238
        {
239
          "include": "#variable-initializer"
240
        }
241
      ]
242
    },
243
    "binding-element-const": {
244
      "patterns": [
245
        {
246
          "include": "#comment"
247
        },
248
        {
249
          "include": "#string"
250
        },
251
        {
252
          "include": "#numeric-literal"
253
        },
254
        {
255
          "include": "#regex"
256
        },
257
        {
258
          "include": "#object-binding-pattern-const"
259
        },
260
        {
261
          "include": "#array-binding-pattern-const"
262
        },
263
        {
264
          "include": "#destructuring-variable-rest-const"
265
        },
266
        {
267
          "include": "#variable-initializer"
268
        }
269
      ]
270
    },
271
    "boolean-literal": {
272
      "patterns": [
273
        {
274
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))true(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
275
          "name": "constant.language.boolean.true.ts"
276
        },
277
        {
278
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))false(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
279
          "name": "constant.language.boolean.false.ts"
280
        }
281
      ]
282
    },
283
    "brackets": {
284
      "patterns": [
285
        {
286
          "begin": "\\{",
287
          "end": "}|(?=\\*/)",
288
          "patterns": [
289
            {
290
              "include": "#brackets"
291
            }
292
          ]
293
        },
294
        {
295
          "begin": "\\[",
296
          "end": "]|(?=\\*/)",
297
          "patterns": [
298
            {
299
              "include": "#brackets"
300
            }
301
          ]
302
        }
303
      ]
304
    },
305
    "cast": {
306
      "patterns": [
307
        {
308
          "captures": {
309
            "1": {
310
              "name": "meta.brace.angle.ts"
311
            },
312
            "2": {
313
              "name": "storage.modifier.ts"
314
            },
315
            "3": {
316
              "name": "meta.brace.angle.ts"
317
            }
318
          },
319
          "match": "\\s*(<)\\s*(const)\\s*(>)",
320
          "name": "cast.expr.ts"
321
        },
322
        {
323
          "begin": "(?<!\\+\\+|--)(?<=^return|[^$._[:alnum:]]return|^throw|[^$._[:alnum:]]throw|^yield|[^$._[:alnum:]]yield|^await|[^$._[:alnum:]]await|^default|[^$._[:alnum:]]default|[\\&(*,:=>?^|]|[^$_[:alnum:]](?:\\+\\+|--)|[^+]\\+|[^-]-)\\s*(<)(?!<?=)(?!\\s*$)",
324
          "beginCaptures": {
325
            "1": {
326
              "name": "meta.brace.angle.ts"
327
            }
328
          },
329
          "end": "(>)",
330
          "endCaptures": {
331
            "1": {
332
              "name": "meta.brace.angle.ts"
333
            }
334
          },
335
          "name": "cast.expr.ts",
336
          "patterns": [
337
            {
338
              "include": "#type"
339
            }
340
          ]
341
        },
342
        {
343
          "begin": "(?<=^)\\s*(<)(?=[$_[:alpha:]][$_[:alnum:]]*\\s*>)",
344
          "beginCaptures": {
345
            "1": {
346
              "name": "meta.brace.angle.ts"
347
            }
348
          },
349
          "end": "(>)",
350
          "endCaptures": {
351
            "1": {
352
              "name": "meta.brace.angle.ts"
353
            }
354
          },
355
          "name": "cast.expr.ts",
356
          "patterns": [
357
            {
358
              "include": "#type"
359
            }
360
          ]
361
        }
362
      ]
363
    },
364
    "class-declaration": {
365
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(?:(abstract)\\s+)?\\b(class)\\b(?=\\s+|/[*/])",
366
      "beginCaptures": {
367
        "1": {
368
          "name": "keyword.control.export.ts"
369
        },
370
        "2": {
371
          "name": "storage.modifier.ts"
372
        },
373
        "3": {
374
          "name": "storage.modifier.ts"
375
        },
376
        "4": {
377
          "name": "storage.type.class.ts"
378
        }
379
      },
380
      "end": "(?<=})",
381
      "name": "meta.class.ts",
382
      "patterns": [
383
        {
384
          "include": "#class-declaration-or-expression-patterns"
385
        }
386
      ]
387
    },
388
    "class-declaration-or-expression-patterns": {
389
      "patterns": [
390
        {
391
          "include": "#comment"
392
        },
393
        {
394
          "include": "#class-or-interface-heritage"
395
        },
396
        {
397
          "captures": {
398
            "0": {
399
              "name": "entity.name.type.class.ts"
400
            }
401
          },
402
          "match": "[$_[:alpha:]][$_[:alnum:]]*"
403
        },
404
        {
405
          "include": "#type-parameters"
406
        },
407
        {
408
          "include": "#class-or-interface-body"
409
        }
410
      ]
411
    },
412
    "class-expression": {
413
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(class)\\b(?=\\s+|[<{]|/[*/])",
414
      "beginCaptures": {
415
        "1": {
416
          "name": "storage.modifier.ts"
417
        },
418
        "2": {
419
          "name": "storage.type.class.ts"
420
        }
421
      },
422
      "end": "(?<=})",
423
      "name": "meta.class.ts",
424
      "patterns": [
425
        {
426
          "include": "#class-declaration-or-expression-patterns"
427
        }
428
      ]
429
    },
430
    "class-or-interface-body": {
431
      "begin": "\\{",
432
      "beginCaptures": {
433
        "0": {
434
          "name": "punctuation.definition.block.ts"
435
        }
436
      },
437
      "end": "}",
438
      "endCaptures": {
439
        "0": {
440
          "name": "punctuation.definition.block.ts"
441
        }
442
      },
443
      "patterns": [
444
        {
445
          "include": "#comment"
446
        },
447
        {
448
          "include": "#decorator"
449
        },
450
        {
451
          "begin": "(?<=:)\\s*",
452
          "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)",
453
          "patterns": [
454
            {
455
              "include": "#expression"
456
            }
457
          ]
458
        },
459
        {
460
          "include": "#method-declaration"
461
        },
462
        {
463
          "include": "#indexer-declaration"
464
        },
465
        {
466
          "include": "#field-declaration"
467
        },
468
        {
469
          "include": "#string"
470
        },
471
        {
472
          "include": "#type-annotation"
473
        },
474
        {
475
          "include": "#variable-initializer"
476
        },
477
        {
478
          "include": "#access-modifier"
479
        },
480
        {
481
          "include": "#property-accessor"
482
        },
483
        {
484
          "include": "#async-modifier"
485
        },
486
        {
487
          "include": "#after-operator-block-as-object-literal"
488
        },
489
        {
490
          "include": "#decl-block"
491
        },
492
        {
493
          "include": "#expression"
494
        },
495
        {
496
          "include": "#punctuation-comma"
497
        },
498
        {
499
          "include": "#punctuation-semicolon"
500
        }
501
      ]
502
    },
503
    "class-or-interface-heritage": {
504
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))\\b(extends|implements)\\b(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
505
      "beginCaptures": {
506
        "1": {
507
          "name": "storage.modifier.ts"
508
        }
509
      },
510
      "end": "(?=\\{)",
511
      "patterns": [
512
        {
513
          "include": "#comment"
514
        },
515
        {
516
          "include": "#class-or-interface-heritage"
517
        },
518
        {
519
          "include": "#type-parameters"
520
        },
521
        {
522
          "include": "#expressionWithoutIdentifiers"
523
        },
524
        {
525
          "captures": {
526
            "1": {
527
              "name": "entity.name.type.module.ts"
528
            },
529
            "2": {
530
              "name": "punctuation.accessor.ts"
531
            },
532
            "3": {
533
              "name": "punctuation.accessor.optional.ts"
534
            }
535
          },
536
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))(?=\\s*[$_[:alpha:]][$_[:alnum:]]*(\\s*\\??\\.\\s*[$_[:alpha:]][$_[:alnum:]]*)*\\s*)"
537
        },
538
        {
539
          "captures": {
540
            "1": {
541
              "name": "entity.other.inherited-class.ts"
542
            }
543
          },
544
          "match": "([$_[:alpha:]][$_[:alnum:]]*)"
545
        },
546
        {
547
          "include": "#expressionPunctuations"
548
        }
549
      ]
550
    },
551
    "comment": {
552
      "patterns": [
553
        {
554
          "begin": "/\\*\\*(?!/)",
555
          "beginCaptures": {
556
            "0": {
557
              "name": "punctuation.definition.comment.ts"
558
            }
559
          },
560
          "end": "\\*/",
561
          "endCaptures": {
562
            "0": {
563
              "name": "punctuation.definition.comment.ts"
564
            }
565
          },
566
          "name": "comment.block.documentation.ts",
567
          "patterns": [
568
            {
569
              "include": "#docblock"
570
            }
571
          ]
572
        },
573
        {
574
          "begin": "(/\\*)(?:\\s*((@)internal)(?=\\s|(\\*/)))?",
575
          "beginCaptures": {
576
            "1": {
577
              "name": "punctuation.definition.comment.ts"
578
            },
579
            "2": {
580
              "name": "storage.type.internaldeclaration.ts"
581
            },
582
            "3": {
583
              "name": "punctuation.decorator.internaldeclaration.ts"
584
            }
585
          },
586
          "end": "\\*/",
587
          "endCaptures": {
588
            "0": {
589
              "name": "punctuation.definition.comment.ts"
590
            }
591
          },
592
          "name": "comment.block.ts"
593
        },
594
        {
595
          "begin": "(^[\\t ]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
596
          "beginCaptures": {
597
            "1": {
598
              "name": "punctuation.whitespace.comment.leading.ts"
599
            },
600
            "2": {
601
              "name": "comment.line.double-slash.ts"
602
            },
603
            "3": {
604
              "name": "punctuation.definition.comment.ts"
605
            },
606
            "4": {
607
              "name": "storage.type.internaldeclaration.ts"
608
            },
609
            "5": {
610
              "name": "punctuation.decorator.internaldeclaration.ts"
611
            }
612
          },
613
          "contentName": "comment.line.double-slash.ts",
614
          "end": "(?=$)"
615
        }
616
      ]
617
    },
618
    "control-statement": {
619
      "patterns": [
620
        {
621
          "include": "#switch-statement"
622
        },
623
        {
624
          "include": "#for-loop"
625
        },
626
        {
627
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(catch|finally|throw|try)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
628
          "name": "keyword.control.trycatch.ts"
629
        },
630
        {
631
          "captures": {
632
            "1": {
633
              "name": "keyword.control.loop.ts"
634
            },
635
            "2": {
636
              "name": "entity.name.label.ts"
637
            }
638
          },
639
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|goto)\\s+([$_[:alpha:]][$_[:alnum:]]*)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
640
        },
641
        {
642
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(break|continue|do|goto|while)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
643
          "name": "keyword.control.loop.ts"
644
        },
645
        {
646
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(return)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
647
          "beginCaptures": {
648
            "0": {
649
              "name": "keyword.control.flow.ts"
650
            }
651
          },
652
          "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)",
653
          "patterns": [
654
            {
655
              "include": "#expression"
656
            }
657
          ]
658
        },
659
        {
660
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default|switch)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
661
          "name": "keyword.control.switch.ts"
662
        },
663
        {
664
          "include": "#if-statement"
665
        },
666
        {
667
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(else|if)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
668
          "name": "keyword.control.conditional.ts"
669
        },
670
        {
671
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(with)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
672
          "name": "keyword.control.with.ts"
673
        },
674
        {
675
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(package)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
676
          "name": "keyword.control.ts"
677
        },
678
        {
679
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(debugger)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
680
          "name": "keyword.other.debugger.ts"
681
        }
682
      ]
683
    },
684
    "decl-block": {
685
      "begin": "\\{",
686
      "beginCaptures": {
687
        "0": {
688
          "name": "punctuation.definition.block.ts"
689
        }
690
      },
691
      "end": "}",
692
      "endCaptures": {
693
        "0": {
694
          "name": "punctuation.definition.block.ts"
695
        }
696
      },
697
      "name": "meta.block.ts",
698
      "patterns": [
699
        {
700
          "include": "#statements"
701
        }
702
      ]
703
    },
704
    "declaration": {
705
      "patterns": [
706
        {
707
          "include": "#decorator"
708
        },
709
        {
710
          "include": "#var-expr"
711
        },
712
        {
713
          "include": "#function-declaration"
714
        },
715
        {
716
          "include": "#class-declaration"
717
        },
718
        {
719
          "include": "#interface-declaration"
720
        },
721
        {
722
          "include": "#enum-declaration"
723
        },
724
        {
725
          "include": "#namespace-declaration"
726
        },
727
        {
728
          "include": "#type-alias-declaration"
729
        },
730
        {
731
          "include": "#import-equals-declaration"
732
        },
733
        {
734
          "include": "#import-declaration"
735
        },
736
        {
737
          "include": "#export-declaration"
738
        },
739
        {
740
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(declare|export)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
741
          "name": "storage.modifier.ts"
742
        }
743
      ]
744
    },
745
    "decorator": {
746
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))@",
747
      "beginCaptures": {
748
        "0": {
749
          "name": "punctuation.decorator.ts"
750
        }
751
      },
752
      "end": "(?=\\s)",
753
      "name": "meta.decorator.ts",
754
      "patterns": [
755
        {
756
          "include": "#expression"
757
        }
758
      ]
759
    },
760
    "destructuring-const": {
761
      "patterns": [
762
        {
763
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\{)",
764
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
765
          "name": "meta.object-binding-pattern-variable.ts",
766
          "patterns": [
767
            {
768
              "include": "#object-binding-pattern-const"
769
            },
770
            {
771
              "include": "#type-annotation"
772
            },
773
            {
774
              "include": "#comment"
775
            }
776
          ]
777
        },
778
        {
779
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\[)",
780
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
781
          "name": "meta.array-binding-pattern-variable.ts",
782
          "patterns": [
783
            {
784
              "include": "#array-binding-pattern-const"
785
            },
786
            {
787
              "include": "#type-annotation"
788
            },
789
            {
790
              "include": "#comment"
791
            }
792
          ]
793
        }
794
      ]
795
    },
796
    "destructuring-parameter": {
797
      "patterns": [
798
        {
799
          "begin": "(?<![:=])\\s*(?:(\\.\\.\\.)\\s*)?(\\{)",
800
          "beginCaptures": {
801
            "1": {
802
              "name": "keyword.operator.rest.ts"
803
            },
804
            "2": {
805
              "name": "punctuation.definition.binding-pattern.object.ts"
806
            }
807
          },
808
          "end": "}",
809
          "endCaptures": {
810
            "0": {
811
              "name": "punctuation.definition.binding-pattern.object.ts"
812
            }
813
          },
814
          "name": "meta.parameter.object-binding-pattern.ts",
815
          "patterns": [
816
            {
817
              "include": "#parameter-object-binding-element"
818
            }
819
          ]
820
        },
821
        {
822
          "begin": "(?<![:=])\\s*(?:(\\.\\.\\.)\\s*)?(\\[)",
823
          "beginCaptures": {
824
            "1": {
825
              "name": "keyword.operator.rest.ts"
826
            },
827
            "2": {
828
              "name": "punctuation.definition.binding-pattern.array.ts"
829
            }
830
          },
831
          "end": "]",
832
          "endCaptures": {
833
            "0": {
834
              "name": "punctuation.definition.binding-pattern.array.ts"
835
            }
836
          },
837
          "name": "meta.paramter.array-binding-pattern.ts",
838
          "patterns": [
839
            {
840
              "include": "#parameter-binding-element"
841
            },
842
            {
843
              "include": "#punctuation-comma"
844
            }
845
          ]
846
        }
847
      ]
848
    },
849
    "destructuring-parameter-rest": {
850
      "captures": {
851
        "1": {
852
          "name": "keyword.operator.rest.ts"
853
        },
854
        "2": {
855
          "name": "variable.parameter.ts"
856
        }
857
      },
858
      "match": "(?:(\\.\\.\\.)\\s*)?([$_[:alpha:]][$_[:alnum:]]*)"
859
    },
860
    "destructuring-variable": {
861
      "patterns": [
862
        {
863
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\{)",
864
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
865
          "name": "meta.object-binding-pattern-variable.ts",
866
          "patterns": [
867
            {
868
              "include": "#object-binding-pattern"
869
            },
870
            {
871
              "include": "#type-annotation"
872
            },
873
            {
874
              "include": "#comment"
875
            }
876
          ]
877
        },
878
        {
879
          "begin": "(?<![:=]|^of|[^$._[:alnum:]]of|^in|[^$._[:alnum:]]in)\\s*(?=\\[)",
880
          "end": "(?=$|^|[,;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
881
          "name": "meta.array-binding-pattern-variable.ts",
882
          "patterns": [
883
            {
884
              "include": "#array-binding-pattern"
885
            },
886
            {
887
              "include": "#type-annotation"
888
            },
889
            {
890
              "include": "#comment"
891
            }
892
          ]
893
        }
894
      ]
895
    },
896
    "destructuring-variable-rest": {
897
      "captures": {
898
        "1": {
899
          "name": "keyword.operator.rest.ts"
900
        },
901
        "2": {
902
          "name": "meta.definition.variable.ts variable.other.readwrite.ts"
903
        }
904
      },
905
      "match": "(?:(\\.\\.\\.)\\s*)?([$_[:alpha:]][$_[:alnum:]]*)"
906
    },
907
    "destructuring-variable-rest-const": {
908
      "captures": {
909
        "1": {
910
          "name": "keyword.operator.rest.ts"
911
        },
912
        "2": {
913
          "name": "meta.definition.variable.ts variable.other.constant.ts"
914
        }
915
      },
916
      "match": "(?:(\\.\\.\\.)\\s*)?([$_[:alpha:]][$_[:alnum:]]*)"
917
    },
918
    "directives": {
919
      "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|lib|name|resolution-mode)\\s*=\\s*(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))+\\s*/>\\s*$)",
920
      "beginCaptures": {
921
        "1": {
922
          "name": "punctuation.definition.comment.ts"
923
        }
924
      },
925
      "end": "(?=$)",
926
      "name": "comment.line.triple-slash.directive.ts",
927
      "patterns": [
928
        {
929
          "begin": "(<)(reference|amd-dependency|amd-module)",
930
          "beginCaptures": {
931
            "1": {
932
              "name": "punctuation.definition.tag.directive.ts"
933
            },
934
            "2": {
935
              "name": "entity.name.tag.directive.ts"
936
            }
937
          },
938
          "end": "/>",
939
          "endCaptures": {
940
            "0": {
941
              "name": "punctuation.definition.tag.directive.ts"
942
            }
943
          },
944
          "name": "meta.tag.ts",
945
          "patterns": [
946
            {
947
              "match": "path|types|no-default-lib|lib|name|resolution-mode",
948
              "name": "entity.other.attribute-name.directive.ts"
949
            },
950
            {
951
              "match": "=",
952
              "name": "keyword.operator.assignment.ts"
953
            },
954
            {
955
              "include": "#string"
956
            }
957
          ]
958
        }
959
      ]
960
    },
961
    "docblock": {
962
      "patterns": [
963
        {
964
          "captures": {
965
            "1": {
966
              "name": "storage.type.class.jsdoc"
967
            },
968
            "2": {
969
              "name": "punctuation.definition.block.tag.jsdoc"
970
            },
971
            "3": {
972
              "name": "constant.language.access-type.jsdoc"
973
            }
974
          },
975
          "match": "((@)a(?:ccess|pi))\\s+(p(?:rivate|rotected|ublic))\\b"
976
        },
977
        {
978
          "captures": {
979
            "1": {
980
              "name": "storage.type.class.jsdoc"
981
            },
982
            "2": {
983
              "name": "punctuation.definition.block.tag.jsdoc"
984
            },
985
            "3": {
986
              "name": "entity.name.type.instance.jsdoc"
987
            },
988
            "4": {
989
              "name": "punctuation.definition.bracket.angle.begin.jsdoc"
990
            },
991
            "5": {
992
              "name": "constant.other.email.link.underline.jsdoc"
993
            },
994
            "6": {
995
              "name": "punctuation.definition.bracket.angle.end.jsdoc"
996
            }
997
          },
998
          "match": "((@)author)\\s+([^*/<>@\\s](?:[^*/<>@]|\\*[^/])*)(?:\\s*(<)([^>\\s]+)(>))?"
999
        },
1000
        {
1001
          "captures": {
1002
            "1": {
1003
              "name": "storage.type.class.jsdoc"
1004
            },
1005
            "2": {
1006
              "name": "punctuation.definition.block.tag.jsdoc"
1007
            },
1008
            "3": {
1009
              "name": "entity.name.type.instance.jsdoc"
1010
            },
1011
            "4": {
1012
              "name": "keyword.operator.control.jsdoc"
1013
            },
1014
            "5": {
1015
              "name": "entity.name.type.instance.jsdoc"
1016
            }
1017
          },
1018
          "match": "((@)borrows)\\s+((?:[^*/@\\s]|\\*[^/])+)\\s+(as)\\s+((?:[^*/@\\s]|\\*[^/])+)"
1019
        },
1020
        {
1021
          "begin": "((@)example)\\s+",
1022
          "beginCaptures": {
1023
            "1": {
1024
              "name": "storage.type.class.jsdoc"
1025
            },
1026
            "2": {
1027
              "name": "punctuation.definition.block.tag.jsdoc"
1028
            }
1029
          },
1030
          "end": "(?=@|\\*/)",
1031
          "name": "meta.example.jsdoc",
1032
          "patterns": [
1033
            {
1034
              "match": "^\\s\\*\\s+"
1035
            },
1036
            {
1037
              "begin": "\\G(<)caption(>)",
1038
              "beginCaptures": {
1039
                "0": {
1040
                  "name": "entity.name.tag.inline.jsdoc"
1041
                },
1042
                "1": {
1043
                  "name": "punctuation.definition.bracket.angle.begin.jsdoc"
1044
                },
1045
                "2": {
1046
                  "name": "punctuation.definition.bracket.angle.end.jsdoc"
1047
                }
1048
              },
1049
              "contentName": "constant.other.description.jsdoc",
1050
              "end": "(</)caption(>)|(?=\\*/)",
1051
              "endCaptures": {
1052
                "0": {
1053
                  "name": "entity.name.tag.inline.jsdoc"
1054
                },
1055
                "1": {
1056
                  "name": "punctuation.definition.bracket.angle.begin.jsdoc"
1057
                },
1058
                "2": {
1059
                  "name": "punctuation.definition.bracket.angle.end.jsdoc"
1060
                }
1061
              }
1062
            },
1063
            {
1064
              "captures": {
1065
                "0": {
1066
                  "name": "source.embedded.ts"
1067
                }
1068
              },
1069
              "match": "[^*@\\s](?:[^*]|\\*[^/])*"
1070
            }
1071
          ]
1072
        },
1073
        {
1074
          "captures": {
1075
            "1": {
1076
              "name": "storage.type.class.jsdoc"
1077
            },
1078
            "2": {
1079
              "name": "punctuation.definition.block.tag.jsdoc"
1080
            },
1081
            "3": {
1082
              "name": "constant.language.symbol-type.jsdoc"
1083
            }
1084
          },
1085
          "match": "((@)kind)\\s+(class|constant|event|external|file|function|member|mixin|module|namespace|typedef)\\b"
1086
        },
1087
        {
1088
          "captures": {
1089
            "1": {
1090
              "name": "storage.type.class.jsdoc"
1091
            },
1092
            "2": {
1093
              "name": "punctuation.definition.block.tag.jsdoc"
1094
            },
1095
            "3": {
1096
              "name": "variable.other.link.underline.jsdoc"
1097
            },
1098
            "4": {
1099
              "name": "entity.name.type.instance.jsdoc"
1100
            }
1101
          },
1102
          "match": "((@)see)\\s+(?:((?=https?://)(?:[^*\\s]|\\*[^/])+)|((?!https?://|(?:\\[[^]\\[]*])?\\{@(?:link|linkcode|linkplain|tutorial)\\b)(?:[^*/@\\s]|\\*[^/])+))"
1103
        },
1104
        {
1105
          "captures": {
1106
            "1": {
1107
              "name": "storage.type.class.jsdoc"
1108
            },
1109
            "2": {
1110
              "name": "punctuation.definition.block.tag.jsdoc"
1111
            },
1112
            "3": {
1113
              "name": "variable.other.jsdoc"
1114
            }
1115
          },
1116
          "match": "((@)template)\\s+([$A-Z_a-z][]$.\\[\\w]*(?:\\s*,\\s*[$A-Z_a-z][]$.\\[\\w]*)*)"
1117
        },
1118
        {
1119
          "begin": "((@)template)\\s+(?=\\{)",
1120
          "beginCaptures": {
1121
            "1": {
1122
              "name": "storage.type.class.jsdoc"
1123
            },
1124
            "2": {
1125
              "name": "punctuation.definition.block.tag.jsdoc"
1126
            }
1127
          },
1128
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1129
          "patterns": [
1130
            {
1131
              "include": "#jsdoctype"
1132
            },
1133
            {
1134
              "match": "([$A-Z_a-z][]$.\\[\\w]*)",
1135
              "name": "variable.other.jsdoc"
1136
            }
1137
          ]
1138
        },
1139
        {
1140
          "captures": {
1141
            "1": {
1142
              "name": "storage.type.class.jsdoc"
1143
            },
1144
            "2": {
1145
              "name": "punctuation.definition.block.tag.jsdoc"
1146
            },
1147
            "3": {
1148
              "name": "variable.other.jsdoc"
1149
            }
1150
          },
1151
          "match": "((@)(?:arg|argument|const|constant|member|namespace|param|var))\\s+([$A-Z_a-z][]$.\\[\\w]*)"
1152
        },
1153
        {
1154
          "begin": "((@)typedef)\\s+(?=\\{)",
1155
          "beginCaptures": {
1156
            "1": {
1157
              "name": "storage.type.class.jsdoc"
1158
            },
1159
            "2": {
1160
              "name": "punctuation.definition.block.tag.jsdoc"
1161
            }
1162
          },
1163
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1164
          "patterns": [
1165
            {
1166
              "include": "#jsdoctype"
1167
            },
1168
            {
1169
              "match": "(?:[^*/@\\s]|\\*[^/])+",
1170
              "name": "entity.name.type.instance.jsdoc"
1171
            }
1172
          ]
1173
        },
1174
        {
1175
          "begin": "((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\\s+(?=\\{)",
1176
          "beginCaptures": {
1177
            "1": {
1178
              "name": "storage.type.class.jsdoc"
1179
            },
1180
            "2": {
1181
              "name": "punctuation.definition.block.tag.jsdoc"
1182
            }
1183
          },
1184
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1185
          "patterns": [
1186
            {
1187
              "include": "#jsdoctype"
1188
            },
1189
            {
1190
              "match": "([$A-Z_a-z][]$.\\[\\w]*)",
1191
              "name": "variable.other.jsdoc"
1192
            },
1193
            {
1194
              "captures": {
1195
                "1": {
1196
                  "name": "punctuation.definition.optional-value.begin.bracket.square.jsdoc"
1197
                },
1198
                "2": {
1199
                  "name": "keyword.operator.assignment.jsdoc"
1200
                },
1201
                "3": {
1202
                  "name": "source.embedded.ts"
1203
                },
1204
                "4": {
1205
                  "name": "punctuation.definition.optional-value.end.bracket.square.jsdoc"
1206
                },
1207
                "5": {
1208
                  "name": "invalid.illegal.syntax.jsdoc"
1209
                }
1210
              },
1211
              "match": "(\\[)\\s*[$\\w]+(?:(?:\\[])?\\.[$\\w]+)*(?:\\s*(=)\\s*((?>\"(?:\\*(?!/)|\\\\(?!\")|[^*\\\\])*?\"|'(?:\\*(?!/)|\\\\(?!')|[^*\\\\])*?'|\\[(?:\\*(?!/)|[^*])*?]|(?:\\*(?!/)|\\s(?!\\s*])|\\[.*?(?:]|(?=\\*/))|[^]*\\[\\s])*)*))?\\s*(?:(])((?:[^*\\s]|\\*[^/\\s])+)?|(?=\\*/))",
1212
              "name": "variable.other.jsdoc"
1213
            }
1214
          ]
1215
        },
1216
        {
1217
          "begin": "((@)(?:define|enum|exception|export|extends|lends|implements|modifies|namespace|private|protected|returns?|satisfies|suppress|this|throws|type|yields?))\\s+(?=\\{)",
1218
          "beginCaptures": {
1219
            "1": {
1220
              "name": "storage.type.class.jsdoc"
1221
            },
1222
            "2": {
1223
              "name": "punctuation.definition.block.tag.jsdoc"
1224
            }
1225
          },
1226
          "end": "(?=\\s|\\*/|[^]$A-\\[_a-{}])",
1227
          "patterns": [
1228
            {
1229
              "include": "#jsdoctype"
1230
            }
1231
          ]
1232
        },
1233
        {
1234
          "captures": {
1235
            "1": {
1236
              "name": "storage.type.class.jsdoc"
1237
            },
1238
            "2": {
1239
              "name": "punctuation.definition.block.tag.jsdoc"
1240
            },
1241
            "3": {
1242
              "name": "entity.name.type.instance.jsdoc"
1243
            }
1244
          },
1245
          "match": "((@)(?:alias|augments|callback|constructs|emits|event|fires|exports?|extends|external|function|func|host|lends|listens|interface|memberof!?|method|module|mixes|mixin|name|requires|see|this|typedef|uses))\\s+((?:[^*@{}\\s]|\\*[^/])+)"
1246
        },
1247
        {
1248
          "begin": "((@)(?:default(?:value)?|license|version))\\s+(([\"']))",
1249
          "beginCaptures": {
1250
            "1": {
1251
              "name": "storage.type.class.jsdoc"
1252
            },
1253
            "2": {
1254
              "name": "punctuation.definition.block.tag.jsdoc"
1255
            },
1256
            "3": {
1257
              "name": "variable.other.jsdoc"
1258
            },
1259
            "4": {
1260
              "name": "punctuation.definition.string.begin.jsdoc"
1261
            }
1262
          },
1263
          "contentName": "variable.other.jsdoc",
1264
          "end": "(\\3)|(?=$|\\*/)",
1265
          "endCaptures": {
1266
            "0": {
1267
              "name": "variable.other.jsdoc"
1268
            },
1269
            "1": {
1270
              "name": "punctuation.definition.string.end.jsdoc"
1271
            }
1272
          }
1273
        },
1274
        {
1275
          "captures": {
1276
            "1": {
1277
              "name": "storage.type.class.jsdoc"
1278
            },
1279
            "2": {
1280
              "name": "punctuation.definition.block.tag.jsdoc"
1281
            },
1282
            "3": {
1283
              "name": "variable.other.jsdoc"
1284
            }
1285
          },
1286
          "match": "((@)(?:default(?:value)?|license|tutorial|variation|version))\\s+([^*\\s]+)"
1287
        },
1288
        {
1289
          "captures": {
1290
            "1": {
1291
              "name": "punctuation.definition.block.tag.jsdoc"
1292
            }
1293
          },
1294
          "match": "(@)(?: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",
1295
          "name": "storage.type.class.jsdoc"
1296
        },
1297
        {
1298
          "include": "#inline-tags"
1299
        },
1300
        {
1301
          "captures": {
1302
            "1": {
1303
              "name": "storage.type.class.jsdoc"
1304
            },
1305
            "2": {
1306
              "name": "punctuation.definition.block.tag.jsdoc"
1307
            }
1308
          },
1309
          "match": "((@)[$_[:alpha:]][$_[:alnum:]]*)(?=\\s+)"
1310
        }
1311
      ]
1312
    },
1313
    "enum-declaration": {
1314
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([$_[:alpha:]][$_[:alnum:]]*)",
1315
      "beginCaptures": {
1316
        "1": {
1317
          "name": "keyword.control.export.ts"
1318
        },
1319
        "2": {
1320
          "name": "storage.modifier.ts"
1321
        },
1322
        "3": {
1323
          "name": "storage.modifier.ts"
1324
        },
1325
        "4": {
1326
          "name": "storage.type.enum.ts"
1327
        },
1328
        "5": {
1329
          "name": "entity.name.type.enum.ts"
1330
        }
1331
      },
1332
      "end": "(?<=})",
1333
      "name": "meta.enum.declaration.ts",
1334
      "patterns": [
1335
        {
1336
          "include": "#comment"
1337
        },
1338
        {
1339
          "begin": "\\{",
1340
          "beginCaptures": {
1341
            "0": {
1342
              "name": "punctuation.definition.block.ts"
1343
            }
1344
          },
1345
          "end": "}",
1346
          "endCaptures": {
1347
            "0": {
1348
              "name": "punctuation.definition.block.ts"
1349
            }
1350
          },
1351
          "patterns": [
1352
            {
1353
              "include": "#comment"
1354
            },
1355
            {
1356
              "begin": "([$_[:alpha:]][$_[:alnum:]]*)",
1357
              "beginCaptures": {
1358
                "0": {
1359
                  "name": "variable.other.enummember.ts"
1360
                }
1361
              },
1362
              "end": "(?=[,}]|$)",
1363
              "patterns": [
1364
                {
1365
                  "include": "#comment"
1366
                },
1367
                {
1368
                  "include": "#variable-initializer"
1369
                }
1370
              ]
1371
            },
1372
            {
1373
              "begin": "(?=(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+])))",
1374
              "end": "(?=[,}]|$)",
1375
              "patterns": [
1376
                {
1377
                  "include": "#string"
1378
                },
1379
                {
1380
                  "include": "#array-literal"
1381
                },
1382
                {
1383
                  "include": "#comment"
1384
                },
1385
                {
1386
                  "include": "#variable-initializer"
1387
                }
1388
              ]
1389
            },
1390
            {
1391
              "include": "#punctuation-comma"
1392
            }
1393
          ]
1394
        }
1395
      ]
1396
    },
1397
    "export-declaration": {
1398
      "patterns": [
1399
        {
1400
          "captures": {
1401
            "1": {
1402
              "name": "keyword.control.export.ts"
1403
            },
1404
            "2": {
1405
              "name": "keyword.control.as.ts"
1406
            },
1407
            "3": {
1408
              "name": "storage.type.namespace.ts"
1409
            },
1410
            "4": {
1411
              "name": "entity.name.type.module.ts"
1412
            }
1413
          },
1414
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)\\s+(as)\\s+(namespace)\\s+([$_[:alpha:]][$_[:alnum:]]*)"
1415
        },
1416
        {
1417
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(export)(?:\\s+(type))?(?:\\s*(=)|\\s+(default)(?=\\s+))",
1418
          "beginCaptures": {
1419
            "1": {
1420
              "name": "keyword.control.export.ts"
1421
            },
1422
            "2": {
1423
              "name": "keyword.control.type.ts"
1424
            },
1425
            "3": {
1426
              "name": "keyword.operator.assignment.ts"
1427
            },
1428
            "4": {
1429
              "name": "keyword.control.default.ts"
1430
            }
1431
          },
1432
          "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)",
1433
          "name": "meta.export.default.ts",
1434
          "patterns": [
1435
            {
1436
              "include": "#interface-declaration"
1437
            },
1438
            {
1439
              "include": "#expression"
1440
            }
1441
          ]
1442
        },
1443
        {
1444
          "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)))",
1445
          "beginCaptures": {
1446
            "1": {
1447
              "name": "keyword.control.export.ts"
1448
            },
1449
            "2": {
1450
              "name": "keyword.control.type.ts"
1451
            }
1452
          },
1453
          "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)",
1454
          "name": "meta.export.ts",
1455
          "patterns": [
1456
            {
1457
              "include": "#import-export-declaration"
1458
            }
1459
          ]
1460
        }
1461
      ]
1462
    },
1463
    "expression": {
1464
      "patterns": [
1465
        {
1466
          "include": "#expressionWithoutIdentifiers"
1467
        },
1468
        {
1469
          "include": "#identifiers"
1470
        },
1471
        {
1472
          "include": "#expressionPunctuations"
1473
        }
1474
      ]
1475
    },
1476
    "expression-inside-possibly-arrow-parens": {
1477
      "patterns": [
1478
        {
1479
          "include": "#expressionWithoutIdentifiers"
1480
        },
1481
        {
1482
          "include": "#comment"
1483
        },
1484
        {
1485
          "include": "#string"
1486
        },
1487
        {
1488
          "include": "#decorator"
1489
        },
1490
        {
1491
          "include": "#destructuring-parameter"
1492
        },
1493
        {
1494
          "captures": {
1495
            "1": {
1496
              "name": "storage.modifier.ts"
1497
            }
1498
          },
1499
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)"
1500
        },
1501
        {
1502
          "captures": {
1503
            "1": {
1504
              "name": "storage.modifier.ts"
1505
            },
1506
            "2": {
1507
              "name": "keyword.operator.rest.ts"
1508
            },
1509
            "3": {
1510
              "name": "entity.name.function.ts variable.language.this.ts"
1511
            },
1512
            "4": {
1513
              "name": "entity.name.function.ts"
1514
            },
1515
            "5": {
1516
              "name": "keyword.operator.optional.ts"
1517
            }
1518
          },
1519
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\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*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))"
1520
        },
1521
        {
1522
          "captures": {
1523
            "1": {
1524
              "name": "storage.modifier.ts"
1525
            },
1526
            "2": {
1527
              "name": "keyword.operator.rest.ts"
1528
            },
1529
            "3": {
1530
              "name": "variable.parameter.ts variable.language.this.ts"
1531
            },
1532
            "4": {
1533
              "name": "variable.parameter.ts"
1534
            },
1535
            "5": {
1536
              "name": "keyword.operator.optional.ts"
1537
            }
1538
          },
1539
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*[,:]|$)"
1540
        },
1541
        {
1542
          "include": "#type-annotation"
1543
        },
1544
        {
1545
          "include": "#variable-initializer"
1546
        },
1547
        {
1548
          "match": ",",
1549
          "name": "punctuation.separator.parameter.ts"
1550
        },
1551
        {
1552
          "include": "#identifiers"
1553
        },
1554
        {
1555
          "include": "#expressionPunctuations"
1556
        }
1557
      ]
1558
    },
1559
    "expression-operators": {
1560
      "patterns": [
1561
        {
1562
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(await)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1563
          "name": "keyword.control.flow.ts"
1564
        },
1565
        {
1566
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?=\\s*/\\*([^*]|(\\*[^/]))*\\*/\\s*\\*)",
1567
          "beginCaptures": {
1568
            "1": {
1569
              "name": "keyword.control.flow.ts"
1570
            }
1571
          },
1572
          "end": "\\*",
1573
          "endCaptures": {
1574
            "0": {
1575
              "name": "keyword.generator.asterisk.ts"
1576
            }
1577
          },
1578
          "patterns": [
1579
            {
1580
              "include": "#comment"
1581
            }
1582
          ]
1583
        },
1584
        {
1585
          "captures": {
1586
            "1": {
1587
              "name": "keyword.control.flow.ts"
1588
            },
1589
            "2": {
1590
              "name": "keyword.generator.asterisk.ts"
1591
            }
1592
          },
1593
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(yield)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s*(\\*))?"
1594
        },
1595
        {
1596
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))delete(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1597
          "name": "keyword.operator.expression.delete.ts"
1598
        },
1599
        {
1600
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))in(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()",
1601
          "name": "keyword.operator.expression.in.ts"
1602
        },
1603
        {
1604
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))of(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?!\\()",
1605
          "name": "keyword.operator.expression.of.ts"
1606
        },
1607
        {
1608
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))instanceof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1609
          "name": "keyword.operator.expression.instanceof.ts"
1610
        },
1611
        {
1612
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1613
          "name": "keyword.operator.new.ts"
1614
        },
1615
        {
1616
          "include": "#typeof-operator"
1617
        },
1618
        {
1619
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))void(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
1620
          "name": "keyword.operator.expression.void.ts"
1621
        },
1622
        {
1623
          "captures": {
1624
            "1": {
1625
              "name": "keyword.control.as.ts"
1626
            },
1627
            "2": {
1628
              "name": "storage.modifier.ts"
1629
            }
1630
          },
1631
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*($|[]),:;}]))"
1632
        },
1633
        {
1634
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
1635
          "beginCaptures": {
1636
            "1": {
1637
              "name": "keyword.control.as.ts"
1638
            },
1639
            "2": {
1640
              "name": "keyword.control.satisfies.ts"
1641
            }
1642
          },
1643
          "end": "(?=^|[-\\])+,:;>?}]|\\|\\||&&|!==|$|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisfies)\\s+)|(\\s+<))",
1644
          "patterns": [
1645
            {
1646
              "include": "#type"
1647
            }
1648
          ]
1649
        },
1650
        {
1651
          "match": "\\.\\.\\.",
1652
          "name": "keyword.operator.spread.ts"
1653
        },
1654
        {
1655
          "match": "(?:\\*|(?<!\\()/|[-%+])=",
1656
          "name": "keyword.operator.assignment.compound.ts"
1657
        },
1658
        {
1659
          "match": "(?:[\\&^]|<<|>>>??|\\|)=",
1660
          "name": "keyword.operator.assignment.compound.bitwise.ts"
1661
        },
1662
        {
1663
          "match": "<<|>>>?",
1664
          "name": "keyword.operator.bitwise.shift.ts"
1665
        },
1666
        {
1667
          "match": "[!=]==?",
1668
          "name": "keyword.operator.comparison.ts"
1669
        },
1670
        {
1671
          "match": "<=|>=|<>|[<>]",
1672
          "name": "keyword.operator.relational.ts"
1673
        },
1674
        {
1675
          "captures": {
1676
            "1": {
1677
              "name": "keyword.operator.logical.ts"
1678
            },
1679
            "2": {
1680
              "name": "keyword.operator.assignment.compound.ts"
1681
            },
1682
            "3": {
1683
              "name": "keyword.operator.arithmetic.ts"
1684
            }
1685
          },
1686
          "match": "(?<=[$_[:alnum:]])(!)\\s*(?:(/=)|(/)(?![*/]))"
1687
        },
1688
        {
1689
          "match": "!|&&|\\|\\||\\?\\?",
1690
          "name": "keyword.operator.logical.ts"
1691
        },
1692
        {
1693
          "match": "[\\&^|~]",
1694
          "name": "keyword.operator.bitwise.ts"
1695
        },
1696
        {
1697
          "match": "=",
1698
          "name": "keyword.operator.assignment.ts"
1699
        },
1700
        {
1701
          "match": "--",
1702
          "name": "keyword.operator.decrement.ts"
1703
        },
1704
        {
1705
          "match": "\\+\\+",
1706
          "name": "keyword.operator.increment.ts"
1707
        },
1708
        {
1709
          "match": "[-%*+/]",
1710
          "name": "keyword.operator.arithmetic.ts"
1711
        },
1712
        {
1713
          "begin": "(?<=[]$)_[:alnum:]])\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)+(?:(/=)|(/)(?![*/])))",
1714
          "end": "(/=)|(/)(?!\\*([^*]|(\\*[^/]))*\\*/)",
1715
          "endCaptures": {
1716
            "1": {
1717
              "name": "keyword.operator.assignment.compound.ts"
1718
            },
1719
            "2": {
1720
              "name": "keyword.operator.arithmetic.ts"
1721
            }
1722
          },
1723
          "patterns": [
1724
            {
1725
              "include": "#comment"
1726
            }
1727
          ]
1728
        },
1729
        {
1730
          "captures": {
1731
            "1": {
1732
              "name": "keyword.operator.assignment.compound.ts"
1733
            },
1734
            "2": {
1735
              "name": "keyword.operator.arithmetic.ts"
1736
            }
1737
          },
1738
          "match": "(?<=[]$)_[:alnum:]])\\s*(?:(/=)|(/)(?![*/]))"
1739
        }
1740
      ]
1741
    },
1742
    "expressionPunctuations": {
1743
      "patterns": [
1744
        {
1745
          "include": "#punctuation-comma"
1746
        },
1747
        {
1748
          "include": "#punctuation-accessor"
1749
        }
1750
      ]
1751
    },
1752
    "expressionWithoutIdentifiers": {
1753
      "patterns": [
1754
        {
1755
          "include": "#string"
1756
        },
1757
        {
1758
          "include": "#regex"
1759
        },
1760
        {
1761
          "include": "#comment"
1762
        },
1763
        {
1764
          "include": "#function-expression"
1765
        },
1766
        {
1767
          "include": "#class-expression"
1768
        },
1769
        {
1770
          "include": "#arrow-function"
1771
        },
1772
        {
1773
          "include": "#paren-expression-possibly-arrow"
1774
        },
1775
        {
1776
          "include": "#cast"
1777
        },
1778
        {
1779
          "include": "#ternary-expression"
1780
        },
1781
        {
1782
          "include": "#new-expr"
1783
        },
1784
        {
1785
          "include": "#instanceof-expr"
1786
        },
1787
        {
1788
          "include": "#object-literal"
1789
        },
1790
        {
1791
          "include": "#expression-operators"
1792
        },
1793
        {
1794
          "include": "#function-call"
1795
        },
1796
        {
1797
          "include": "#literal"
1798
        },
1799
        {
1800
          "include": "#support-objects"
1801
        },
1802
        {
1803
          "include": "#paren-expression"
1804
        }
1805
      ]
1806
    },
1807
    "field-declaration": {
1808
      "begin": "(?<!\\()(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s+)?(?=\\s*(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|(#?[$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(?:(?:(\\?)|(!))\\s*)?([,:;=}]|$))",
1809
      "beginCaptures": {
1810
        "1": {
1811
          "name": "storage.modifier.ts"
1812
        }
1813
      },
1814
      "end": "(?=[,;}]|$|^((?!\\s*(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|(#?[$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(?:(?:(\\?)|(!))\\s*)?([,:;=]|$))))|(?<=})",
1815
      "name": "meta.field.declaration.ts",
1816
      "patterns": [
1817
        {
1818
          "include": "#variable-initializer"
1819
        },
1820
        {
1821
          "include": "#type-annotation"
1822
        },
1823
        {
1824
          "include": "#string"
1825
        },
1826
        {
1827
          "include": "#array-literal"
1828
        },
1829
        {
1830
          "include": "#numeric-literal"
1831
        },
1832
        {
1833
          "include": "#comment"
1834
        },
1835
        {
1836
          "captures": {
1837
            "1": {
1838
              "name": "meta.definition.property.ts entity.name.function.ts"
1839
            },
1840
            "2": {
1841
              "name": "keyword.operator.optional.ts"
1842
            },
1843
            "3": {
1844
              "name": "keyword.operator.definiteassignment.ts"
1845
            }
1846
          },
1847
          "match": "(#?[$_[:alpha:]][$_[:alnum:]]*)(?:(\\?)|(!))?(?=\\s*\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\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*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))"
1848
        },
1849
        {
1850
          "match": "#?[$_[:alpha:]][$_[:alnum:]]*",
1851
          "name": "meta.definition.property.ts variable.object.property.ts"
1852
        },
1853
        {
1854
          "match": "\\?",
1855
          "name": "keyword.operator.optional.ts"
1856
        },
1857
        {
1858
          "match": "!",
1859
          "name": "keyword.operator.definiteassignment.ts"
1860
        }
1861
      ]
1862
    },
1863
    "for-loop": {
1864
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))for(?=((\\s+|(\\s*/\\*([^*]|(\\*[^/]))*\\*/\\s*))await)?\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)?(\\())",
1865
      "beginCaptures": {
1866
        "0": {
1867
          "name": "keyword.control.loop.ts"
1868
        }
1869
      },
1870
      "end": "(?<=\\))",
1871
      "patterns": [
1872
        {
1873
          "include": "#comment"
1874
        },
1875
        {
1876
          "match": "await",
1877
          "name": "keyword.control.loop.ts"
1878
        },
1879
        {
1880
          "begin": "\\(",
1881
          "beginCaptures": {
1882
            "0": {
1883
              "name": "meta.brace.round.ts"
1884
            }
1885
          },
1886
          "end": "\\)",
1887
          "endCaptures": {
1888
            "0": {
1889
              "name": "meta.brace.round.ts"
1890
            }
1891
          },
1892
          "patterns": [
1893
            {
1894
              "include": "#var-expr"
1895
            },
1896
            {
1897
              "include": "#expression"
1898
            },
1899
            {
1900
              "include": "#punctuation-semicolon"
1901
            }
1902
          ]
1903
        }
1904
      ]
1905
    },
1906
    "function-body": {
1907
      "patterns": [
1908
        {
1909
          "include": "#comment"
1910
        },
1911
        {
1912
          "include": "#type-parameters"
1913
        },
1914
        {
1915
          "include": "#function-parameters"
1916
        },
1917
        {
1918
          "include": "#return-type"
1919
        },
1920
        {
1921
          "include": "#type-function-return-type"
1922
        },
1923
        {
1924
          "include": "#decl-block"
1925
        },
1926
        {
1927
          "match": "\\*",
1928
          "name": "keyword.generator.asterisk.ts"
1929
        }
1930
      ]
1931
    },
1932
    "function-call": {
1933
      "patterns": [
1934
        {
1935
          "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*)?\\())",
1936
          "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*)?\\())",
1937
          "patterns": [
1938
            {
1939
              "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))",
1940
              "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*)?\\())",
1941
              "name": "meta.function-call.ts",
1942
              "patterns": [
1943
                {
1944
                  "include": "#function-call-target"
1945
                }
1946
              ]
1947
            },
1948
            {
1949
              "include": "#comment"
1950
            },
1951
            {
1952
              "include": "#function-call-optionals"
1953
            },
1954
            {
1955
              "include": "#type-arguments"
1956
            },
1957
            {
1958
              "include": "#paren-expression"
1959
            }
1960
          ]
1961
        },
1962
        {
1963
          "begin": "(?=(((([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))|(?<=\\)))(<\\s*[(\\[{]\\s*)$)",
1964
          "end": "(?<=>)(?!(((([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))|(?<=\\)))(<\\s*[(\\[{]\\s*)$)",
1965
          "patterns": [
1966
            {
1967
              "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*)(\\s*\\??\\.\\s*(#?[$_[:alpha:]][$_[:alnum:]]*))*)|(\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*))",
1968
              "end": "(?=(<\\s*[(\\[{]\\s*)$)",
1969
              "name": "meta.function-call.ts",
1970
              "patterns": [
1971
                {
1972
                  "include": "#function-call-target"
1973
                }
1974
              ]
1975
            },
1976
            {
1977
              "include": "#comment"
1978
            },
1979
            {
1980
              "include": "#function-call-optionals"
1981
            },
1982
            {
1983
              "include": "#type-arguments"
1984
            }
1985
          ]
1986
        }
1987
      ]
1988
    },
1989
    "function-call-optionals": {
1990
      "patterns": [
1991
        {
1992
          "match": "\\?\\.",
1993
          "name": "meta.function-call.ts punctuation.accessor.optional.ts"
1994
        },
1995
        {
1996
          "match": "!",
1997
          "name": "meta.function-call.ts keyword.operator.definiteassignment.ts"
1998
        }
1999
      ]
2000
    },
2001
    "function-call-target": {
2002
      "patterns": [
2003
        {
2004
          "include": "#support-function-call-identifiers"
2005
        },
2006
        {
2007
          "match": "(#?[$_[:alpha:]][$_[:alnum:]]*)",
2008
          "name": "entity.name.function.ts"
2009
        }
2010
      ]
2011
    },
2012
    "function-declaration": {
2013
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?(?:(async)\\s+)?(function)\\b(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([$_[:alpha:]][$_[:alnum:]]*))?\\s*",
2014
      "beginCaptures": {
2015
        "1": {
2016
          "name": "keyword.control.export.ts"
2017
        },
2018
        "2": {
2019
          "name": "storage.modifier.ts"
2020
        },
2021
        "3": {
2022
          "name": "storage.modifier.async.ts"
2023
        },
2024
        "4": {
2025
          "name": "storage.type.function.ts"
2026
        },
2027
        "5": {
2028
          "name": "keyword.generator.asterisk.ts"
2029
        },
2030
        "6": {
2031
          "name": "meta.definition.function.ts entity.name.function.ts"
2032
        }
2033
      },
2034
      "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)|(?<=})",
2035
      "name": "meta.function.ts",
2036
      "patterns": [
2037
        {
2038
          "include": "#function-name"
2039
        },
2040
        {
2041
          "include": "#function-body"
2042
        }
2043
      ]
2044
    },
2045
    "function-expression": {
2046
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(async)\\s+)?(function)\\b(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([$_[:alpha:]][$_[:alnum:]]*))?\\s*",
2047
      "beginCaptures": {
2048
        "1": {
2049
          "name": "storage.modifier.async.ts"
2050
        },
2051
        "2": {
2052
          "name": "storage.type.function.ts"
2053
        },
2054
        "3": {
2055
          "name": "keyword.generator.asterisk.ts"
2056
        },
2057
        "4": {
2058
          "name": "meta.definition.function.ts entity.name.function.ts"
2059
        }
2060
      },
2061
      "end": "(?=;)|(?<=})",
2062
      "name": "meta.function.expression.ts",
2063
      "patterns": [
2064
        {
2065
          "include": "#function-name"
2066
        },
2067
        {
2068
          "include": "#single-line-comment-consuming-line-ending"
2069
        },
2070
        {
2071
          "include": "#function-body"
2072
        }
2073
      ]
2074
    },
2075
    "function-name": {
2076
      "match": "[$_[:alpha:]][$_[:alnum:]]*",
2077
      "name": "meta.definition.function.ts entity.name.function.ts"
2078
    },
2079
    "function-parameters": {
2080
      "begin": "\\(",
2081
      "beginCaptures": {
2082
        "0": {
2083
          "name": "punctuation.definition.parameters.begin.ts"
2084
        }
2085
      },
2086
      "end": "\\)",
2087
      "endCaptures": {
2088
        "0": {
2089
          "name": "punctuation.definition.parameters.end.ts"
2090
        }
2091
      },
2092
      "name": "meta.parameters.ts",
2093
      "patterns": [
2094
        {
2095
          "include": "#function-parameters-body"
2096
        }
2097
      ]
2098
    },
2099
    "function-parameters-body": {
2100
      "patterns": [
2101
        {
2102
          "include": "#comment"
2103
        },
2104
        {
2105
          "include": "#string"
2106
        },
2107
        {
2108
          "include": "#decorator"
2109
        },
2110
        {
2111
          "include": "#destructuring-parameter"
2112
        },
2113
        {
2114
          "include": "#parameter-name"
2115
        },
2116
        {
2117
          "include": "#parameter-type-annotation"
2118
        },
2119
        {
2120
          "include": "#variable-initializer"
2121
        },
2122
        {
2123
          "match": ",",
2124
          "name": "punctuation.separator.parameter.ts"
2125
        }
2126
      ]
2127
    },
2128
    "identifiers": {
2129
      "patterns": [
2130
        {
2131
          "include": "#object-identifiers"
2132
        },
2133
        {
2134
          "captures": {
2135
            "1": {
2136
              "name": "punctuation.accessor.ts"
2137
            },
2138
            "2": {
2139
              "name": "punctuation.accessor.optional.ts"
2140
            },
2141
            "3": {
2142
              "name": "entity.name.function.ts"
2143
            }
2144
          },
2145
          "match": "(?:(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*)?([$_[:alpha:]][$_[:alnum:]]*)(?=\\s*=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))"
2146
        },
2147
        {
2148
          "captures": {
2149
            "1": {
2150
              "name": "punctuation.accessor.ts"
2151
            },
2152
            "2": {
2153
              "name": "punctuation.accessor.optional.ts"
2154
            },
2155
            "3": {
2156
              "name": "variable.other.constant.property.ts"
2157
            }
2158
          },
2159
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(#?\\p{upper}[$_\\d[:upper:]]*)(?![$_[:alnum:]])"
2160
        },
2161
        {
2162
          "captures": {
2163
            "1": {
2164
              "name": "punctuation.accessor.ts"
2165
            },
2166
            "2": {
2167
              "name": "punctuation.accessor.optional.ts"
2168
            },
2169
            "3": {
2170
              "name": "variable.other.property.ts"
2171
            }
2172
          },
2173
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(#?[$_[:alpha:]][$_[:alnum:]]*)"
2174
        },
2175
        {
2176
          "match": "(\\p{upper}[$_\\d[:upper:]]*)(?![$_[:alnum:]])",
2177
          "name": "variable.other.constant.ts"
2178
        },
2179
        {
2180
          "match": "[$_[:alpha:]][$_[:alnum:]]*",
2181
          "name": "variable.other.readwrite.ts"
2182
        }
2183
      ]
2184
    },
2185
    "if-statement": {
2186
      "patterns": [
2187
        {
2188
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bif\\s*(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))\\s*(?!\\{))",
2189
          "end": "(?=;|$|})",
2190
          "patterns": [
2191
            {
2192
              "include": "#comment"
2193
            },
2194
            {
2195
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(if)\\s*(\\()",
2196
              "beginCaptures": {
2197
                "1": {
2198
                  "name": "keyword.control.conditional.ts"
2199
                },
2200
                "2": {
2201
                  "name": "meta.brace.round.ts"
2202
                }
2203
              },
2204
              "end": "\\)",
2205
              "endCaptures": {
2206
                "0": {
2207
                  "name": "meta.brace.round.ts"
2208
                }
2209
              },
2210
              "patterns": [
2211
                {
2212
                  "include": "#expression"
2213
                }
2214
              ]
2215
            },
2216
            {
2217
              "begin": "(?<=\\))\\s*/(?![*/])(?=(?:[^/\\[\\\\]|\\\\.|\\[([^]\\\\]|\\\\.)*])+/([dgimsuvy]+|(?![*/])|(?=/\\*))(?!\\s*[$0-9A-Z_a-z]))",
2218
              "beginCaptures": {
2219
                "0": {
2220
                  "name": "punctuation.definition.string.begin.ts"
2221
                }
2222
              },
2223
              "end": "(/)([dgimsuvy]*)",
2224
              "endCaptures": {
2225
                "1": {
2226
                  "name": "punctuation.definition.string.end.ts"
2227
                },
2228
                "2": {
2229
                  "name": "keyword.other.ts"
2230
                }
2231
              },
2232
              "name": "string.regexp.ts",
2233
              "patterns": [
2234
                {
2235
                  "include": "#regexp"
2236
                }
2237
              ]
2238
            },
2239
            {
2240
              "include": "#statements"
2241
            }
2242
          ]
2243
        }
2244
      ]
2245
    },
2246
    "import-declaration": {
2247
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(import)(?:\\s+(type)(?!\\s+from))?(?!\\s*[(:])(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2248
      "beginCaptures": {
2249
        "1": {
2250
          "name": "keyword.control.export.ts"
2251
        },
2252
        "2": {
2253
          "name": "storage.modifier.ts"
2254
        },
2255
        "3": {
2256
          "name": "keyword.control.import.ts"
2257
        },
2258
        "4": {
2259
          "name": "keyword.control.type.ts"
2260
        }
2261
      },
2262
      "end": "(?<!(?:^|[^$._[:alnum:]])import)(?=;|$|^)",
2263
      "name": "meta.import.ts",
2264
      "patterns": [
2265
        {
2266
          "include": "#single-line-comment-consuming-line-ending"
2267
        },
2268
        {
2269
          "include": "#comment"
2270
        },
2271
        {
2272
          "include": "#string"
2273
        },
2274
        {
2275
          "begin": "(?<=(?:^|[^$._[:alnum:]])import)(?!\\s*[\"'])",
2276
          "end": "\\bfrom\\b",
2277
          "endCaptures": {
2278
            "0": {
2279
              "name": "keyword.control.from.ts"
2280
            }
2281
          },
2282
          "patterns": [
2283
            {
2284
              "include": "#import-export-declaration"
2285
            }
2286
          ]
2287
        },
2288
        {
2289
          "include": "#import-export-declaration"
2290
        }
2291
      ]
2292
    },
2293
    "import-equals-declaration": {
2294
      "patterns": [
2295
        {
2296
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
2297
          "beginCaptures": {
2298
            "1": {
2299
              "name": "keyword.control.export.ts"
2300
            },
2301
            "2": {
2302
              "name": "storage.modifier.ts"
2303
            },
2304
            "3": {
2305
              "name": "keyword.control.import.ts"
2306
            },
2307
            "4": {
2308
              "name": "keyword.control.type.ts"
2309
            },
2310
            "5": {
2311
              "name": "variable.other.readwrite.alias.ts"
2312
            },
2313
            "6": {
2314
              "name": "keyword.operator.assignment.ts"
2315
            },
2316
            "7": {
2317
              "name": "keyword.control.require.ts"
2318
            },
2319
            "8": {
2320
              "name": "meta.brace.round.ts"
2321
            }
2322
          },
2323
          "end": "\\)",
2324
          "endCaptures": {
2325
            "0": {
2326
              "name": "meta.brace.round.ts"
2327
            }
2328
          },
2329
          "name": "meta.import-equals.external.ts",
2330
          "patterns": [
2331
            {
2332
              "include": "#comment"
2333
            },
2334
            {
2335
              "include": "#string"
2336
            }
2337
          ]
2338
        },
2339
        {
2340
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(import)(?:\\s+(type))?\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
2341
          "beginCaptures": {
2342
            "1": {
2343
              "name": "keyword.control.export.ts"
2344
            },
2345
            "2": {
2346
              "name": "storage.modifier.ts"
2347
            },
2348
            "3": {
2349
              "name": "keyword.control.import.ts"
2350
            },
2351
            "4": {
2352
              "name": "keyword.control.type.ts"
2353
            },
2354
            "5": {
2355
              "name": "variable.other.readwrite.alias.ts"
2356
            },
2357
            "6": {
2358
              "name": "keyword.operator.assignment.ts"
2359
            }
2360
          },
2361
          "end": "(?=;|$|^)",
2362
          "name": "meta.import-equals.internal.ts",
2363
          "patterns": [
2364
            {
2365
              "include": "#single-line-comment-consuming-line-ending"
2366
            },
2367
            {
2368
              "include": "#comment"
2369
            },
2370
            {
2371
              "captures": {
2372
                "1": {
2373
                  "name": "entity.name.type.module.ts"
2374
                },
2375
                "2": {
2376
                  "name": "punctuation.accessor.ts"
2377
                },
2378
                "3": {
2379
                  "name": "punctuation.accessor.optional.ts"
2380
                }
2381
              },
2382
              "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))"
2383
            },
2384
            {
2385
              "match": "([$_[:alpha:]][$_[:alnum:]]*)",
2386
              "name": "variable.other.readwrite.ts"
2387
            }
2388
          ]
2389
        }
2390
      ]
2391
    },
2392
    "import-export-assert-clause": {
2393
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(with)|(assert))\\s*(\\{)",
2394
      "beginCaptures": {
2395
        "1": {
2396
          "name": "keyword.control.with.ts"
2397
        },
2398
        "2": {
2399
          "name": "keyword.control.assert.ts"
2400
        },
2401
        "3": {
2402
          "name": "punctuation.definition.block.ts"
2403
        }
2404
      },
2405
      "end": "}",
2406
      "endCaptures": {
2407
        "0": {
2408
          "name": "punctuation.definition.block.ts"
2409
        }
2410
      },
2411
      "patterns": [
2412
        {
2413
          "include": "#comment"
2414
        },
2415
        {
2416
          "include": "#string"
2417
        },
2418
        {
2419
          "match": "[$_[:alpha:]][$_[:alnum:]]*\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:)",
2420
          "name": "meta.object-literal.key.ts"
2421
        },
2422
        {
2423
          "match": ":",
2424
          "name": "punctuation.separator.key-value.ts"
2425
        }
2426
      ]
2427
    },
2428
    "import-export-block": {
2429
      "begin": "\\{",
2430
      "beginCaptures": {
2431
        "0": {
2432
          "name": "punctuation.definition.block.ts"
2433
        }
2434
      },
2435
      "end": "}",
2436
      "endCaptures": {
2437
        "0": {
2438
          "name": "punctuation.definition.block.ts"
2439
        }
2440
      },
2441
      "name": "meta.block.ts",
2442
      "patterns": [
2443
        {
2444
          "include": "#import-export-clause"
2445
        }
2446
      ]
2447
    },
2448
    "import-export-clause": {
2449
      "patterns": [
2450
        {
2451
          "include": "#comment"
2452
        },
2453
        {
2454
          "captures": {
2455
            "1": {
2456
              "name": "keyword.control.type.ts"
2457
            },
2458
            "12": {
2459
              "name": "keyword.control.as.ts"
2460
            },
2461
            "13": {
2462
              "name": "keyword.control.default.ts"
2463
            },
2464
            "14": {
2465
              "name": "variable.other.readwrite.alias.ts"
2466
            },
2467
            "15": {
2468
              "name": "string.quoted.alias.ts"
2469
            },
2470
            "2": {
2471
              "name": "keyword.control.default.ts"
2472
            },
2473
            "3": {
2474
              "name": "constant.language.import-export-all.ts"
2475
            },
2476
            "4": {
2477
              "name": "variable.other.readwrite.ts"
2478
            },
2479
            "5": {
2480
              "name": "string.quoted.alias.ts"
2481
            }
2482
          },
2483
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(type)\\s+)?(?:\\b(default)|(\\*)|\\b([$_[:alpha:]][$_[:alnum:]]*)|(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))\\s+(as)\\s+(?:(default(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|([$_[:alpha:]][$_[:alnum:]]*)|(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))"
2484
        },
2485
        {
2486
          "include": "#punctuation-comma"
2487
        },
2488
        {
2489
          "match": "\\*",
2490
          "name": "constant.language.import-export-all.ts"
2491
        },
2492
        {
2493
          "match": "\\b(default)\\b",
2494
          "name": "keyword.control.default.ts"
2495
        },
2496
        {
2497
          "captures": {
2498
            "1": {
2499
              "name": "keyword.control.type.ts"
2500
            },
2501
            "2": {
2502
              "name": "variable.other.readwrite.alias.ts"
2503
            },
2504
            "3": {
2505
              "name": "string.quoted.alias.ts"
2506
            }
2507
          },
2508
          "match": "(?:\\b(type)\\s+)?(?:([$_[:alpha:]][$_[:alnum:]]*)|(('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)))"
2509
        }
2510
      ]
2511
    },
2512
    "import-export-declaration": {
2513
      "patterns": [
2514
        {
2515
          "include": "#comment"
2516
        },
2517
        {
2518
          "include": "#string"
2519
        },
2520
        {
2521
          "include": "#import-export-block"
2522
        },
2523
        {
2524
          "match": "\\bfrom\\b",
2525
          "name": "keyword.control.from.ts"
2526
        },
2527
        {
2528
          "include": "#import-export-assert-clause"
2529
        },
2530
        {
2531
          "include": "#import-export-clause"
2532
        }
2533
      ]
2534
    },
2535
    "indexer-declaration": {
2536
      "begin": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)\\s*)?\\s*(\\[)\\s*([$_[:alpha:]][$_[:alnum:]]*)\\s*(?=:)",
2537
      "beginCaptures": {
2538
        "1": {
2539
          "name": "storage.modifier.ts"
2540
        },
2541
        "2": {
2542
          "name": "meta.brace.square.ts"
2543
        },
2544
        "3": {
2545
          "name": "variable.parameter.ts"
2546
        }
2547
      },
2548
      "end": "(])\\s*(\\?\\s*)?|$",
2549
      "endCaptures": {
2550
        "1": {
2551
          "name": "meta.brace.square.ts"
2552
        },
2553
        "2": {
2554
          "name": "keyword.operator.optional.ts"
2555
        }
2556
      },
2557
      "name": "meta.indexer.declaration.ts",
2558
      "patterns": [
2559
        {
2560
          "include": "#type-annotation"
2561
        }
2562
      ]
2563
    },
2564
    "indexer-mapped-type-declaration": {
2565
      "begin": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([-+])?(readonly)\\s*)?\\s*(\\[)\\s*([$_[:alpha:]][$_[:alnum:]]*)\\s+(in)\\s+",
2566
      "beginCaptures": {
2567
        "1": {
2568
          "name": "keyword.operator.type.modifier.ts"
2569
        },
2570
        "2": {
2571
          "name": "storage.modifier.ts"
2572
        },
2573
        "3": {
2574
          "name": "meta.brace.square.ts"
2575
        },
2576
        "4": {
2577
          "name": "entity.name.type.ts"
2578
        },
2579
        "5": {
2580
          "name": "keyword.operator.expression.in.ts"
2581
        }
2582
      },
2583
      "end": "(])([-+])?\\s*(\\?\\s*)?|$",
2584
      "endCaptures": {
2585
        "1": {
2586
          "name": "meta.brace.square.ts"
2587
        },
2588
        "2": {
2589
          "name": "keyword.operator.type.modifier.ts"
2590
        },
2591
        "3": {
2592
          "name": "keyword.operator.optional.ts"
2593
        }
2594
      },
2595
      "name": "meta.indexer.mappedtype.declaration.ts",
2596
      "patterns": [
2597
        {
2598
          "captures": {
2599
            "1": {
2600
              "name": "keyword.control.as.ts"
2601
            }
2602
          },
2603
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+"
2604
        },
2605
        {
2606
          "include": "#type"
2607
        }
2608
      ]
2609
    },
2610
    "inline-tags": {
2611
      "patterns": [
2612
        {
2613
          "captures": {
2614
            "1": {
2615
              "name": "punctuation.definition.bracket.square.begin.jsdoc"
2616
            },
2617
            "2": {
2618
              "name": "punctuation.definition.bracket.square.end.jsdoc"
2619
            }
2620
          },
2621
          "match": "(\\[)[^]]+(])(?=\\{@(?:link|linkcode|linkplain|tutorial))",
2622
          "name": "constant.other.description.jsdoc"
2623
        },
2624
        {
2625
          "begin": "(\\{)((@)(?:link(?:code|plain)?|tutorial))\\s*",
2626
          "beginCaptures": {
2627
            "1": {
2628
              "name": "punctuation.definition.bracket.curly.begin.jsdoc"
2629
            },
2630
            "2": {
2631
              "name": "storage.type.class.jsdoc"
2632
            },
2633
            "3": {
2634
              "name": "punctuation.definition.inline.tag.jsdoc"
2635
            }
2636
          },
2637
          "end": "}|(?=\\*/)",
2638
          "endCaptures": {
2639
            "0": {
2640
              "name": "punctuation.definition.bracket.curly.end.jsdoc"
2641
            }
2642
          },
2643
          "name": "entity.name.type.instance.jsdoc",
2644
          "patterns": [
2645
            {
2646
              "captures": {
2647
                "1": {
2648
                  "name": "variable.other.link.underline.jsdoc"
2649
                },
2650
                "2": {
2651
                  "name": "punctuation.separator.pipe.jsdoc"
2652
                }
2653
              },
2654
              "match": "\\G((?=https?://)(?:[^*|}\\s]|\\*/)+)(\\|)?"
2655
            },
2656
            {
2657
              "captures": {
2658
                "1": {
2659
                  "name": "variable.other.description.jsdoc"
2660
                },
2661
                "2": {
2662
                  "name": "punctuation.separator.pipe.jsdoc"
2663
                }
2664
              },
2665
              "match": "\\G((?:[^*@{|}\\s]|\\*[^/])+)(\\|)?"
2666
            }
2667
          ]
2668
        }
2669
      ]
2670
    },
2671
    "instanceof-expr": {
2672
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(instanceof)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2673
      "beginCaptures": {
2674
        "1": {
2675
          "name": "keyword.operator.expression.instanceof.ts"
2676
        }
2677
      },
2678
      "end": "(?<=\\))|(?=[-\\])+,:;>?}]|\\|\\||&&|!==|$|([!=]==?)|(([\\&^|~]\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s+instanceof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[$_[:alpha:]][$_[:alnum:]]*)|(\\s*\\())))",
2679
      "patterns": [
2680
        {
2681
          "include": "#type"
2682
        }
2683
      ]
2684
    },
2685
    "interface-declaration": {
2686
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(?:(abstract)\\s+)?\\b(interface)\\b(?=\\s+|/[*/])",
2687
      "beginCaptures": {
2688
        "1": {
2689
          "name": "keyword.control.export.ts"
2690
        },
2691
        "2": {
2692
          "name": "storage.modifier.ts"
2693
        },
2694
        "3": {
2695
          "name": "storage.modifier.ts"
2696
        },
2697
        "4": {
2698
          "name": "storage.type.interface.ts"
2699
        }
2700
      },
2701
      "end": "(?<=})",
2702
      "name": "meta.interface.ts",
2703
      "patterns": [
2704
        {
2705
          "include": "#comment"
2706
        },
2707
        {
2708
          "include": "#class-or-interface-heritage"
2709
        },
2710
        {
2711
          "captures": {
2712
            "0": {
2713
              "name": "entity.name.type.interface.ts"
2714
            }
2715
          },
2716
          "match": "[$_[:alpha:]][$_[:alnum:]]*"
2717
        },
2718
        {
2719
          "include": "#type-parameters"
2720
        },
2721
        {
2722
          "include": "#class-or-interface-body"
2723
        }
2724
      ]
2725
    },
2726
    "jsdoctype": {
2727
      "patterns": [
2728
        {
2729
          "begin": "\\G(\\{)",
2730
          "beginCaptures": {
2731
            "0": {
2732
              "name": "entity.name.type.instance.jsdoc"
2733
            },
2734
            "1": {
2735
              "name": "punctuation.definition.bracket.curly.begin.jsdoc"
2736
            }
2737
          },
2738
          "contentName": "entity.name.type.instance.jsdoc",
2739
          "end": "((}))\\s*|(?=\\*/)",
2740
          "endCaptures": {
2741
            "1": {
2742
              "name": "entity.name.type.instance.jsdoc"
2743
            },
2744
            "2": {
2745
              "name": "punctuation.definition.bracket.curly.end.jsdoc"
2746
            }
2747
          },
2748
          "patterns": [
2749
            {
2750
              "include": "#brackets"
2751
            }
2752
          ]
2753
        }
2754
      ]
2755
    },
2756
    "label": {
2757
      "patterns": [
2758
        {
2759
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(:)(?=\\s*\\{)",
2760
          "beginCaptures": {
2761
            "1": {
2762
              "name": "entity.name.label.ts"
2763
            },
2764
            "2": {
2765
              "name": "punctuation.separator.label.ts"
2766
            }
2767
          },
2768
          "end": "(?<=})",
2769
          "patterns": [
2770
            {
2771
              "include": "#decl-block"
2772
            }
2773
          ]
2774
        },
2775
        {
2776
          "captures": {
2777
            "1": {
2778
              "name": "entity.name.label.ts"
2779
            },
2780
            "2": {
2781
              "name": "punctuation.separator.label.ts"
2782
            }
2783
          },
2784
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(:)"
2785
        }
2786
      ]
2787
    },
2788
    "literal": {
2789
      "patterns": [
2790
        {
2791
          "include": "#numeric-literal"
2792
        },
2793
        {
2794
          "include": "#boolean-literal"
2795
        },
2796
        {
2797
          "include": "#null-literal"
2798
        },
2799
        {
2800
          "include": "#undefined-literal"
2801
        },
2802
        {
2803
          "include": "#numericConstant-literal"
2804
        },
2805
        {
2806
          "include": "#array-literal"
2807
        },
2808
        {
2809
          "include": "#this-literal"
2810
        },
2811
        {
2812
          "include": "#super-literal"
2813
        }
2814
      ]
2815
    },
2816
    "method-declaration": {
2817
      "patterns": [
2818
        {
2819
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(p(?:ublic|rivate|rotected))\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?\\s*\\b(constructor)\\b(?!:)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2820
          "beginCaptures": {
2821
            "1": {
2822
              "name": "storage.modifier.ts"
2823
            },
2824
            "2": {
2825
              "name": "storage.modifier.ts"
2826
            },
2827
            "3": {
2828
              "name": "storage.modifier.ts"
2829
            },
2830
            "4": {
2831
              "name": "storage.modifier.async.ts"
2832
            },
2833
            "5": {
2834
              "name": "storage.type.ts"
2835
            }
2836
          },
2837
          "end": "(?=[,;}]|$)|(?<=})",
2838
          "name": "meta.method.declaration.ts",
2839
          "patterns": [
2840
            {
2841
              "include": "#method-declaration-name"
2842
            },
2843
            {
2844
              "include": "#function-body"
2845
            }
2846
          ]
2847
        },
2848
        {
2849
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(p(?:ublic|rivate|rotected))\\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*))?\\()",
2850
          "beginCaptures": {
2851
            "1": {
2852
              "name": "storage.modifier.ts"
2853
            },
2854
            "2": {
2855
              "name": "storage.modifier.ts"
2856
            },
2857
            "3": {
2858
              "name": "storage.modifier.ts"
2859
            },
2860
            "4": {
2861
              "name": "storage.modifier.async.ts"
2862
            },
2863
            "5": {
2864
              "name": "keyword.operator.new.ts"
2865
            },
2866
            "6": {
2867
              "name": "keyword.generator.asterisk.ts"
2868
            }
2869
          },
2870
          "end": "(?=[,;}]|$)|(?<=})",
2871
          "name": "meta.method.declaration.ts",
2872
          "patterns": [
2873
            {
2874
              "include": "#method-declaration-name"
2875
            },
2876
            {
2877
              "include": "#function-body"
2878
            }
2879
          ]
2880
        },
2881
        {
2882
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(override)\\s+)?(?:\\b(p(?:ublic|rivate|rotected))\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b([gs]et)\\s+)?(?:(\\*)\\s*)?(?=\\s*((\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*))?\\()",
2883
          "beginCaptures": {
2884
            "1": {
2885
              "name": "storage.modifier.ts"
2886
            },
2887
            "2": {
2888
              "name": "storage.modifier.ts"
2889
            },
2890
            "3": {
2891
              "name": "storage.modifier.ts"
2892
            },
2893
            "4": {
2894
              "name": "storage.modifier.async.ts"
2895
            },
2896
            "5": {
2897
              "name": "storage.type.property.ts"
2898
            },
2899
            "6": {
2900
              "name": "keyword.generator.asterisk.ts"
2901
            }
2902
          },
2903
          "end": "(?=[,;}]|$)|(?<=})",
2904
          "name": "meta.method.declaration.ts",
2905
          "patterns": [
2906
            {
2907
              "include": "#method-declaration-name"
2908
            },
2909
            {
2910
              "include": "#function-body"
2911
            }
2912
          ]
2913
        }
2914
      ]
2915
    },
2916
    "method-declaration-name": {
2917
      "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(\\??)\\s*[(<])",
2918
      "end": "(?=[(<])",
2919
      "patterns": [
2920
        {
2921
          "include": "#string"
2922
        },
2923
        {
2924
          "include": "#array-literal"
2925
        },
2926
        {
2927
          "include": "#numeric-literal"
2928
        },
2929
        {
2930
          "match": "[$_[:alpha:]][$_[:alnum:]]*",
2931
          "name": "meta.definition.method.ts entity.name.function.ts"
2932
        },
2933
        {
2934
          "match": "\\?",
2935
          "name": "keyword.operator.optional.ts"
2936
        }
2937
      ]
2938
    },
2939
    "namespace-declaration": {
2940
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(namespace|module)\\s+(?=[\"$'_`[:alpha:]])",
2941
      "beginCaptures": {
2942
        "1": {
2943
          "name": "keyword.control.export.ts"
2944
        },
2945
        "2": {
2946
          "name": "storage.modifier.ts"
2947
        },
2948
        "3": {
2949
          "name": "storage.type.namespace.ts"
2950
        }
2951
      },
2952
      "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)",
2953
      "name": "meta.namespace.declaration.ts",
2954
      "patterns": [
2955
        {
2956
          "include": "#comment"
2957
        },
2958
        {
2959
          "include": "#string"
2960
        },
2961
        {
2962
          "match": "([$_[:alpha:]][$_[:alnum:]]*)",
2963
          "name": "entity.name.type.module.ts"
2964
        },
2965
        {
2966
          "include": "#punctuation-accessor"
2967
        },
2968
        {
2969
          "include": "#decl-block"
2970
        }
2971
      ]
2972
    },
2973
    "new-expr": {
2974
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2975
      "beginCaptures": {
2976
        "1": {
2977
          "name": "keyword.operator.new.ts"
2978
        }
2979
      },
2980
      "end": "(?<=\\))|(?=[-\\])+,:;>?}]|\\|\\||&&|!==|$|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))new(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))function((\\s+[$_[:alpha:]][$_[:alnum:]]*)|(\\s*\\())))",
2981
      "name": "new.expr.ts",
2982
      "patterns": [
2983
        {
2984
          "include": "#expression"
2985
        }
2986
      ]
2987
    },
2988
    "null-literal": {
2989
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))null(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
2990
      "name": "constant.language.null.ts"
2991
    },
2992
    "numeric-literal": {
2993
      "patterns": [
2994
        {
2995
          "captures": {
2996
            "1": {
2997
              "name": "storage.type.numeric.bigint.ts"
2998
            }
2999
          },
3000
          "match": "\\b(?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$)",
3001
          "name": "constant.numeric.hex.ts"
3002
        },
3003
        {
3004
          "captures": {
3005
            "1": {
3006
              "name": "storage.type.numeric.bigint.ts"
3007
            }
3008
          },
3009
          "match": "\\b(?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$)",
3010
          "name": "constant.numeric.binary.ts"
3011
        },
3012
        {
3013
          "captures": {
3014
            "1": {
3015
              "name": "storage.type.numeric.bigint.ts"
3016
            }
3017
          },
3018
          "match": "\\b(?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$)",
3019
          "name": "constant.numeric.octal.ts"
3020
        },
3021
        {
3022
          "captures": {
3023
            "0": {
3024
              "name": "constant.numeric.decimal.ts"
3025
            },
3026
            "1": {
3027
              "name": "meta.delimiter.decimal.period.ts"
3028
            },
3029
            "10": {
3030
              "name": "meta.delimiter.decimal.period.ts"
3031
            },
3032
            "11": {
3033
              "name": "storage.type.numeric.bigint.ts"
3034
            },
3035
            "12": {
3036
              "name": "meta.delimiter.decimal.period.ts"
3037
            },
3038
            "13": {
3039
              "name": "storage.type.numeric.bigint.ts"
3040
            },
3041
            "14": {
3042
              "name": "storage.type.numeric.bigint.ts"
3043
            },
3044
            "2": {
3045
              "name": "storage.type.numeric.bigint.ts"
3046
            },
3047
            "3": {
3048
              "name": "meta.delimiter.decimal.period.ts"
3049
            },
3050
            "4": {
3051
              "name": "storage.type.numeric.bigint.ts"
3052
            },
3053
            "5": {
3054
              "name": "meta.delimiter.decimal.period.ts"
3055
            },
3056
            "6": {
3057
              "name": "storage.type.numeric.bigint.ts"
3058
            },
3059
            "7": {
3060
              "name": "storage.type.numeric.bigint.ts"
3061
            },
3062
            "8": {
3063
              "name": "meta.delimiter.decimal.period.ts"
3064
            },
3065
            "9": {
3066
              "name": "storage.type.numeric.bigint.ts"
3067
            }
3068
          },
3069
          "match": "(?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$)"
3070
        }
3071
      ]
3072
    },
3073
    "numericConstant-literal": {
3074
      "patterns": [
3075
        {
3076
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))NaN(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3077
          "name": "constant.language.nan.ts"
3078
        },
3079
        {
3080
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Infinity(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3081
          "name": "constant.language.infinity.ts"
3082
        }
3083
      ]
3084
    },
3085
    "object-binding-element": {
3086
      "patterns": [
3087
        {
3088
          "include": "#comment"
3089
        },
3090
        {
3091
          "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(:))",
3092
          "end": "(?=[,}])",
3093
          "patterns": [
3094
            {
3095
              "include": "#object-binding-element-propertyName"
3096
            },
3097
            {
3098
              "include": "#binding-element"
3099
            }
3100
          ]
3101
        },
3102
        {
3103
          "include": "#object-binding-pattern"
3104
        },
3105
        {
3106
          "include": "#destructuring-variable-rest"
3107
        },
3108
        {
3109
          "include": "#variable-initializer"
3110
        },
3111
        {
3112
          "include": "#punctuation-comma"
3113
        }
3114
      ]
3115
    },
3116
    "object-binding-element-const": {
3117
      "patterns": [
3118
        {
3119
          "include": "#comment"
3120
        },
3121
        {
3122
          "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(:))",
3123
          "end": "(?=[,}])",
3124
          "patterns": [
3125
            {
3126
              "include": "#object-binding-element-propertyName"
3127
            },
3128
            {
3129
              "include": "#binding-element-const"
3130
            }
3131
          ]
3132
        },
3133
        {
3134
          "include": "#object-binding-pattern-const"
3135
        },
3136
        {
3137
          "include": "#destructuring-variable-rest-const"
3138
        },
3139
        {
3140
          "include": "#variable-initializer"
3141
        },
3142
        {
3143
          "include": "#punctuation-comma"
3144
        }
3145
      ]
3146
    },
3147
    "object-binding-element-propertyName": {
3148
      "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(:))",
3149
      "end": "(:)",
3150
      "endCaptures": {
3151
        "0": {
3152
          "name": "punctuation.destructuring.ts"
3153
        }
3154
      },
3155
      "patterns": [
3156
        {
3157
          "include": "#string"
3158
        },
3159
        {
3160
          "include": "#array-literal"
3161
        },
3162
        {
3163
          "include": "#numeric-literal"
3164
        },
3165
        {
3166
          "match": "([$_[:alpha:]][$_[:alnum:]]*)",
3167
          "name": "variable.object.property.ts"
3168
        }
3169
      ]
3170
    },
3171
    "object-binding-pattern": {
3172
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
3173
      "beginCaptures": {
3174
        "1": {
3175
          "name": "keyword.operator.rest.ts"
3176
        },
3177
        "2": {
3178
          "name": "punctuation.definition.binding-pattern.object.ts"
3179
        }
3180
      },
3181
      "end": "}",
3182
      "endCaptures": {
3183
        "0": {
3184
          "name": "punctuation.definition.binding-pattern.object.ts"
3185
        }
3186
      },
3187
      "patterns": [
3188
        {
3189
          "include": "#object-binding-element"
3190
        }
3191
      ]
3192
    },
3193
    "object-binding-pattern-const": {
3194
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
3195
      "beginCaptures": {
3196
        "1": {
3197
          "name": "keyword.operator.rest.ts"
3198
        },
3199
        "2": {
3200
          "name": "punctuation.definition.binding-pattern.object.ts"
3201
        }
3202
      },
3203
      "end": "}",
3204
      "endCaptures": {
3205
        "0": {
3206
          "name": "punctuation.definition.binding-pattern.object.ts"
3207
        }
3208
      },
3209
      "patterns": [
3210
        {
3211
          "include": "#object-binding-element-const"
3212
        }
3213
      ]
3214
    },
3215
    "object-identifiers": {
3216
      "patterns": [
3217
        {
3218
          "match": "([$_[:alpha:]][$_[:alnum:]]*)(?=\\s*\\??\\.\\s*prototype\\b(?!\\$))",
3219
          "name": "support.class.ts"
3220
        },
3221
        {
3222
          "captures": {
3223
            "1": {
3224
              "name": "punctuation.accessor.ts"
3225
            },
3226
            "2": {
3227
              "name": "punctuation.accessor.optional.ts"
3228
            },
3229
            "3": {
3230
              "name": "variable.other.constant.object.property.ts"
3231
            },
3232
            "4": {
3233
              "name": "variable.other.object.property.ts"
3234
            }
3235
          },
3236
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(?:(#?\\p{upper}[$_\\d[:upper:]]*)|(#?[$_[:alpha:]][$_[:alnum:]]*))(?=\\s*\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*)"
3237
        },
3238
        {
3239
          "captures": {
3240
            "1": {
3241
              "name": "variable.other.constant.object.ts"
3242
            },
3243
            "2": {
3244
              "name": "variable.other.object.ts"
3245
            }
3246
          },
3247
          "match": "(?:(\\p{upper}[$_\\d[:upper:]]*)|([$_[:alpha:]][$_[:alnum:]]*))(?=\\s*\\??\\.\\s*#?[$_[:alpha:]][$_[:alnum:]]*)"
3248
        }
3249
      ]
3250
    },
3251
    "object-literal": {
3252
      "begin": "\\{",
3253
      "beginCaptures": {
3254
        "0": {
3255
          "name": "punctuation.definition.block.ts"
3256
        }
3257
      },
3258
      "end": "}",
3259
      "endCaptures": {
3260
        "0": {
3261
          "name": "punctuation.definition.block.ts"
3262
        }
3263
      },
3264
      "name": "meta.objectliteral.ts",
3265
      "patterns": [
3266
        {
3267
          "include": "#object-member"
3268
        }
3269
      ]
3270
    },
3271
    "object-literal-method-declaration": {
3272
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b([gs]et)\\s+)?(?:(\\*)\\s*)?(?=\\s*((\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*))?\\()",
3273
      "beginCaptures": {
3274
        "1": {
3275
          "name": "storage.modifier.async.ts"
3276
        },
3277
        "2": {
3278
          "name": "storage.type.property.ts"
3279
        },
3280
        "3": {
3281
          "name": "keyword.generator.asterisk.ts"
3282
        }
3283
      },
3284
      "end": "(?=[,;}])|(?<=})",
3285
      "name": "meta.method.declaration.ts",
3286
      "patterns": [
3287
        {
3288
          "include": "#method-declaration-name"
3289
        },
3290
        {
3291
          "include": "#function-body"
3292
        },
3293
        {
3294
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(async)\\s+)?(?:\\b([gs]et)\\s+)?(?:(\\*)\\s*)?(?=\\s*((\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(\\??))\\s*((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*))?\\()",
3295
          "beginCaptures": {
3296
            "1": {
3297
              "name": "storage.modifier.async.ts"
3298
            },
3299
            "2": {
3300
              "name": "storage.type.property.ts"
3301
            },
3302
            "3": {
3303
              "name": "keyword.generator.asterisk.ts"
3304
            }
3305
          },
3306
          "end": "(?=[(<])",
3307
          "patterns": [
3308
            {
3309
              "include": "#method-declaration-name"
3310
            }
3311
          ]
3312
        }
3313
      ]
3314
    },
3315
    "object-member": {
3316
      "patterns": [
3317
        {
3318
          "include": "#comment"
3319
        },
3320
        {
3321
          "include": "#object-literal-method-declaration"
3322
        },
3323
        {
3324
          "begin": "(?=\\[)",
3325
          "end": "(?=:)|((?<=])(?=\\s*[(<]))",
3326
          "name": "meta.object.member.ts meta.object-literal.key.ts",
3327
          "patterns": [
3328
            {
3329
              "include": "#comment"
3330
            },
3331
            {
3332
              "include": "#array-literal"
3333
            }
3334
          ]
3335
        },
3336
        {
3337
          "begin": "(?=[\"'`])",
3338
          "end": "(?=:)|((?<=[\"'`])(?=((\\s*[(,<}])|(\\s+(as|satisifies)\\s+))))",
3339
          "name": "meta.object.member.ts meta.object-literal.key.ts",
3340
          "patterns": [
3341
            {
3342
              "include": "#comment"
3343
            },
3344
            {
3345
              "include": "#string"
3346
            }
3347
          ]
3348
        },
3349
        {
3350
          "begin": "(?=\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$)))",
3351
          "end": "(?=:)|(?=\\s*([(,<}])|(\\s+as|satisifies\\s+))",
3352
          "name": "meta.object.member.ts meta.object-literal.key.ts",
3353
          "patterns": [
3354
            {
3355
              "include": "#comment"
3356
            },
3357
            {
3358
              "include": "#numeric-literal"
3359
            }
3360
          ]
3361
        },
3362
        {
3363
          "begin": "(?<=[]\"'`])(?=\\s*[(<])",
3364
          "end": "(?=[,;}])|(?<=})",
3365
          "name": "meta.method.declaration.ts",
3366
          "patterns": [
3367
            {
3368
              "include": "#function-body"
3369
            }
3370
          ]
3371
        },
3372
        {
3373
          "captures": {
3374
            "0": {
3375
              "name": "meta.object-literal.key.ts"
3376
            },
3377
            "1": {
3378
              "name": "constant.numeric.decimal.ts"
3379
            }
3380
          },
3381
          "match": "(?![$_[:alpha:]])(\\d+)\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:)",
3382
          "name": "meta.object.member.ts"
3383
        },
3384
        {
3385
          "captures": {
3386
            "0": {
3387
              "name": "meta.object-literal.key.ts"
3388
            },
3389
            "1": {
3390
              "name": "entity.name.function.ts"
3391
            }
3392
          },
3393
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:(\\s*/\\*([^*]|(\\*[^/]))*\\*/)*\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))",
3394
          "name": "meta.object.member.ts"
3395
        },
3396
        {
3397
          "captures": {
3398
            "0": {
3399
              "name": "meta.object-literal.key.ts"
3400
            }
3401
          },
3402
          "match": "[$_[:alpha:]][$_[:alnum:]]*\\s*(?=(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*:)",
3403
          "name": "meta.object.member.ts"
3404
        },
3405
        {
3406
          "begin": "\\.\\.\\.",
3407
          "beginCaptures": {
3408
            "0": {
3409
              "name": "keyword.operator.spread.ts"
3410
            }
3411
          },
3412
          "end": "(?=[,}])",
3413
          "name": "meta.object.member.ts",
3414
          "patterns": [
3415
            {
3416
              "include": "#expression"
3417
            }
3418
          ]
3419
        },
3420
        {
3421
          "captures": {
3422
            "1": {
3423
              "name": "variable.other.readwrite.ts"
3424
            }
3425
          },
3426
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?=[,}]|$|//|/\\*)",
3427
          "name": "meta.object.member.ts"
3428
        },
3429
        {
3430
          "captures": {
3431
            "1": {
3432
              "name": "keyword.control.as.ts"
3433
            },
3434
            "2": {
3435
              "name": "storage.modifier.ts"
3436
            }
3437
          },
3438
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as)\\s+(const)(?=\\s*([,}]|$))",
3439
          "name": "meta.object.member.ts"
3440
        },
3441
        {
3442
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(as)|(satisfies))\\s+",
3443
          "beginCaptures": {
3444
            "1": {
3445
              "name": "keyword.control.as.ts"
3446
            },
3447
            "2": {
3448
              "name": "keyword.control.satisfies.ts"
3449
            }
3450
          },
3451
          "end": "(?=[-\\])+,:;>?}]|\\|\\||&&|!==|$|^|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(as|satisifies)\\s+))",
3452
          "name": "meta.object.member.ts",
3453
          "patterns": [
3454
            {
3455
              "include": "#type"
3456
            }
3457
          ]
3458
        },
3459
        {
3460
          "begin": "(?=[$_[:alpha:]][$_[:alnum:]]*\\s*=)",
3461
          "end": "(?=[,}]|$|//|/\\*)",
3462
          "name": "meta.object.member.ts",
3463
          "patterns": [
3464
            {
3465
              "include": "#expression"
3466
            }
3467
          ]
3468
        },
3469
        {
3470
          "begin": ":",
3471
          "beginCaptures": {
3472
            "0": {
3473
              "name": "meta.object-literal.key.ts punctuation.separator.key-value.ts"
3474
            }
3475
          },
3476
          "end": "(?=[,}])",
3477
          "name": "meta.object.member.ts",
3478
          "patterns": [
3479
            {
3480
              "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*)))))",
3481
              "beginCaptures": {
3482
                "1": {
3483
                  "name": "storage.modifier.async.ts"
3484
                }
3485
              },
3486
              "end": "(?<=\\))",
3487
              "patterns": [
3488
                {
3489
                  "include": "#type-parameters"
3490
                },
3491
                {
3492
                  "begin": "\\(",
3493
                  "beginCaptures": {
3494
                    "0": {
3495
                      "name": "meta.brace.round.ts"
3496
                    }
3497
                  },
3498
                  "end": "\\)",
3499
                  "endCaptures": {
3500
                    "0": {
3501
                      "name": "meta.brace.round.ts"
3502
                    }
3503
                  },
3504
                  "patterns": [
3505
                    {
3506
                      "include": "#expression-inside-possibly-arrow-parens"
3507
                    }
3508
                  ]
3509
                }
3510
              ]
3511
            },
3512
            {
3513
              "begin": "(?<=:)\\s*(async)?\\s*(\\()(?=\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))",
3514
              "beginCaptures": {
3515
                "1": {
3516
                  "name": "storage.modifier.async.ts"
3517
                },
3518
                "2": {
3519
                  "name": "meta.brace.round.ts"
3520
                }
3521
              },
3522
              "end": "\\)",
3523
              "endCaptures": {
3524
                "0": {
3525
                  "name": "meta.brace.round.ts"
3526
                }
3527
              },
3528
              "patterns": [
3529
                {
3530
                  "include": "#expression-inside-possibly-arrow-parens"
3531
                }
3532
              ]
3533
            },
3534
            {
3535
              "begin": "(?<=:)\\s*(async)?\\s*(?=<\\s*$)",
3536
              "beginCaptures": {
3537
                "1": {
3538
                  "name": "storage.modifier.async.ts"
3539
                }
3540
              },
3541
              "end": "(?<=>)",
3542
              "patterns": [
3543
                {
3544
                  "include": "#type-parameters"
3545
                }
3546
              ]
3547
            },
3548
            {
3549
              "begin": "(?<=>)\\s*(\\()(?=\\s*((([\\[{]\\s*)?)$|((\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})\\s*((:\\s*\\{?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))|((\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])\\s*((:\\s*\\[?)$|((\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*)?=\\s*)))))",
3550
              "beginCaptures": {
3551
                "1": {
3552
                  "name": "meta.brace.round.ts"
3553
                }
3554
              },
3555
              "end": "\\)",
3556
              "endCaptures": {
3557
                "0": {
3558
                  "name": "meta.brace.round.ts"
3559
                }
3560
              },
3561
              "patterns": [
3562
                {
3563
                  "include": "#expression-inside-possibly-arrow-parens"
3564
                }
3565
              ]
3566
            },
3567
            {
3568
              "include": "#possibly-arrow-return-type"
3569
            },
3570
            {
3571
              "include": "#expression"
3572
            }
3573
          ]
3574
        },
3575
        {
3576
          "include": "#punctuation-comma"
3577
        },
3578
        {
3579
          "include": "#decl-block"
3580
        }
3581
      ]
3582
    },
3583
    "parameter-array-binding-pattern": {
3584
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
3585
      "beginCaptures": {
3586
        "1": {
3587
          "name": "keyword.operator.rest.ts"
3588
        },
3589
        "2": {
3590
          "name": "punctuation.definition.binding-pattern.array.ts"
3591
        }
3592
      },
3593
      "end": "]",
3594
      "endCaptures": {
3595
        "0": {
3596
          "name": "punctuation.definition.binding-pattern.array.ts"
3597
        }
3598
      },
3599
      "patterns": [
3600
        {
3601
          "include": "#parameter-binding-element"
3602
        },
3603
        {
3604
          "include": "#punctuation-comma"
3605
        }
3606
      ]
3607
    },
3608
    "parameter-binding-element": {
3609
      "patterns": [
3610
        {
3611
          "include": "#comment"
3612
        },
3613
        {
3614
          "include": "#string"
3615
        },
3616
        {
3617
          "include": "#numeric-literal"
3618
        },
3619
        {
3620
          "include": "#regex"
3621
        },
3622
        {
3623
          "include": "#parameter-object-binding-pattern"
3624
        },
3625
        {
3626
          "include": "#parameter-array-binding-pattern"
3627
        },
3628
        {
3629
          "include": "#destructuring-parameter-rest"
3630
        },
3631
        {
3632
          "include": "#variable-initializer"
3633
        }
3634
      ]
3635
    },
3636
    "parameter-name": {
3637
      "patterns": [
3638
        {
3639
          "captures": {
3640
            "1": {
3641
              "name": "storage.modifier.ts"
3642
            }
3643
          },
3644
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|protected|private|readonly)\\s+(?=(override|public|protected|private|readonly)\\s+)"
3645
        },
3646
        {
3647
          "captures": {
3648
            "1": {
3649
              "name": "storage.modifier.ts"
3650
            },
3651
            "2": {
3652
              "name": "keyword.operator.rest.ts"
3653
            },
3654
            "3": {
3655
              "name": "entity.name.function.ts variable.language.this.ts"
3656
            },
3657
            "4": {
3658
              "name": "entity.name.function.ts"
3659
            },
3660
            "5": {
3661
              "name": "keyword.operator.optional.ts"
3662
            }
3663
          },
3664
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\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*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))"
3665
        },
3666
        {
3667
          "captures": {
3668
            "1": {
3669
              "name": "storage.modifier.ts"
3670
            },
3671
            "2": {
3672
              "name": "keyword.operator.rest.ts"
3673
            },
3674
            "3": {
3675
              "name": "variable.parameter.ts variable.language.this.ts"
3676
            },
3677
            "4": {
3678
              "name": "variable.parameter.ts"
3679
            },
3680
            "5": {
3681
              "name": "keyword.operator.optional.ts"
3682
            }
3683
          },
3684
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(override|public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*(\\??)"
3685
        }
3686
      ]
3687
    },
3688
    "parameter-object-binding-element": {
3689
      "patterns": [
3690
        {
3691
          "include": "#comment"
3692
        },
3693
        {
3694
          "begin": "(?=(\\b((?<!\\$)0[Xx]\\h[_\\h]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Bb][01][01_]*(n)?\\b(?!\\$))|\\b((?<!\\$)0[Oo]?[0-7][0-7_]*(n)?\\b(?!\\$))|((?<!\\$)(?:\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\B(\\.)[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*[Ee][-+]?[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(\\.)(n)?\\B|\\B(\\.)[0-9][0-9_]*(n)?\\b|\\b[0-9][0-9_]*(n)?\\b(?!\\.))(?!\\$))|([$_[:alpha:]][$_[:alnum:]]*)|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`)|(\\[([^]\\[]|\\[[^]\\[]*])+]))\\s*(:))",
3695
          "end": "(?=[,}])",
3696
          "patterns": [
3697
            {
3698
              "include": "#object-binding-element-propertyName"
3699
            },
3700
            {
3701
              "include": "#parameter-binding-element"
3702
            },
3703
            {
3704
              "include": "#paren-expression"
3705
            }
3706
          ]
3707
        },
3708
        {
3709
          "include": "#parameter-object-binding-pattern"
3710
        },
3711
        {
3712
          "include": "#destructuring-parameter-rest"
3713
        },
3714
        {
3715
          "include": "#variable-initializer"
3716
        },
3717
        {
3718
          "include": "#punctuation-comma"
3719
        }
3720
      ]
3721
    },
3722
    "parameter-object-binding-pattern": {
3723
      "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
3724
      "beginCaptures": {
3725
        "1": {
3726
          "name": "keyword.operator.rest.ts"
3727
        },
3728
        "2": {
3729
          "name": "punctuation.definition.binding-pattern.object.ts"
3730
        }
3731
      },
3732
      "end": "}",
3733
      "endCaptures": {
3734
        "0": {
3735
          "name": "punctuation.definition.binding-pattern.object.ts"
3736
        }
3737
      },
3738
      "patterns": [
3739
        {
3740
          "include": "#parameter-object-binding-element"
3741
        }
3742
      ]
3743
    },
3744
    "parameter-type-annotation": {
3745
      "patterns": [
3746
        {
3747
          "begin": "(:)",
3748
          "beginCaptures": {
3749
            "1": {
3750
              "name": "keyword.operator.type.annotation.ts"
3751
            }
3752
          },
3753
          "end": "(?=[),])|(?==[^>])",
3754
          "name": "meta.type.annotation.ts",
3755
          "patterns": [
3756
            {
3757
              "include": "#type"
3758
            }
3759
          ]
3760
        }
3761
      ]
3762
    },
3763
    "paren-expression": {
3764
      "begin": "\\(",
3765
      "beginCaptures": {
3766
        "0": {
3767
          "name": "meta.brace.round.ts"
3768
        }
3769
      },
3770
      "end": "\\)",
3771
      "endCaptures": {
3772
        "0": {
3773
          "name": "meta.brace.round.ts"
3774
        }
3775
      },
3776
      "patterns": [
3777
        {
3778
          "include": "#expression"
3779
        }
3780
      ]
3781
    },
3782
    "paren-expression-possibly-arrow": {
3783
      "patterns": [
3784
        {
3785
          "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*)))))",
3786
          "beginCaptures": {
3787
            "1": {
3788
              "name": "storage.modifier.async.ts"
3789
            }
3790
          },
3791
          "end": "(?<=\\))",
3792
          "patterns": [
3793
            {
3794
              "include": "#paren-expression-possibly-arrow-with-typeparameters"
3795
            }
3796
          ]
3797
        },
3798
        {
3799
          "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*$)",
3800
          "beginCaptures": {
3801
            "1": {
3802
              "name": "storage.modifier.async.ts"
3803
            }
3804
          },
3805
          "end": "(?<=\\))",
3806
          "patterns": [
3807
            {
3808
              "include": "#paren-expression-possibly-arrow-with-typeparameters"
3809
            }
3810
          ]
3811
        },
3812
        {
3813
          "include": "#possibly-arrow-return-type"
3814
        }
3815
      ]
3816
    },
3817
    "paren-expression-possibly-arrow-with-typeparameters": {
3818
      "patterns": [
3819
        {
3820
          "include": "#type-parameters"
3821
        },
3822
        {
3823
          "begin": "\\(",
3824
          "beginCaptures": {
3825
            "0": {
3826
              "name": "meta.brace.round.ts"
3827
            }
3828
          },
3829
          "end": "\\)",
3830
          "endCaptures": {
3831
            "0": {
3832
              "name": "meta.brace.round.ts"
3833
            }
3834
          },
3835
          "patterns": [
3836
            {
3837
              "include": "#expression-inside-possibly-arrow-parens"
3838
            }
3839
          ]
3840
        }
3841
      ]
3842
    },
3843
    "possibly-arrow-return-type": {
3844
      "begin": "(?<=\\)|^)\\s*(:)(?=\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+\\s*=>)",
3845
      "beginCaptures": {
3846
        "1": {
3847
          "name": "meta.arrow.ts meta.return.type.arrow.ts keyword.operator.type.annotation.ts"
3848
        }
3849
      },
3850
      "contentName": "meta.arrow.ts meta.return.type.arrow.ts",
3851
      "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+))",
3852
      "patterns": [
3853
        {
3854
          "include": "#arrow-return-type-body"
3855
        }
3856
      ]
3857
    },
3858
    "property-accessor": {
3859
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(accessor|get|set)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
3860
      "name": "storage.type.property.ts"
3861
    },
3862
    "punctuation-accessor": {
3863
      "captures": {
3864
        "1": {
3865
          "name": "punctuation.accessor.ts"
3866
        },
3867
        "2": {
3868
          "name": "punctuation.accessor.optional.ts"
3869
        }
3870
      },
3871
      "match": "(\\.)|(\\?\\.(?!\\s*\\d))"
3872
    },
3873
    "punctuation-comma": {
3874
      "match": ",",
3875
      "name": "punctuation.separator.comma.ts"
3876
    },
3877
    "punctuation-semicolon": {
3878
      "match": ";",
3879
      "name": "punctuation.terminator.statement.ts"
3880
    },
3881
    "qstring-double": {
3882
      "begin": "\"",
3883
      "beginCaptures": {
3884
        "0": {
3885
          "name": "punctuation.definition.string.begin.ts"
3886
        }
3887
      },
3888
      "end": "(\")|([^\\n\\\\])$",
3889
      "endCaptures": {
3890
        "1": {
3891
          "name": "punctuation.definition.string.end.ts"
3892
        },
3893
        "2": {
3894
          "name": "invalid.illegal.newline.ts"
3895
        }
3896
      },
3897
      "name": "string.quoted.double.ts",
3898
      "patterns": [
3899
        {
3900
          "include": "#string-character-escape"
3901
        }
3902
      ]
3903
    },
3904
    "qstring-single": {
3905
      "begin": "'",
3906
      "beginCaptures": {
3907
        "0": {
3908
          "name": "punctuation.definition.string.begin.ts"
3909
        }
3910
      },
3911
      "end": "(')|([^\\n\\\\])$",
3912
      "endCaptures": {
3913
        "1": {
3914
          "name": "punctuation.definition.string.end.ts"
3915
        },
3916
        "2": {
3917
          "name": "invalid.illegal.newline.ts"
3918
        }
3919
      },
3920
      "name": "string.quoted.single.ts",
3921
      "patterns": [
3922
        {
3923
          "include": "#string-character-escape"
3924
        }
3925
      ]
3926
    },
3927
    "regex": {
3928
      "patterns": [
3929
        {
3930
          "begin": "(?<!\\+\\+|--|})(?<=[!(+,:=?\\[]|^return|[^$._[:alnum:]]return|^case|[^$._[:alnum:]]case|=>|&&|\\|\\||\\*/)\\s*(/)(?![*/])(?=(?:[^()/\\[\\\\]|\\\\.|\\[([^]\\\\]|\\\\.)+]|\\(([^)\\\\]|\\\\.)+\\))+/([dgimsuvy]+|(?![*/])|(?=/\\*))(?!\\s*[$0-9A-Z_a-z]))",
3931
          "beginCaptures": {
3932
            "1": {
3933
              "name": "punctuation.definition.string.begin.ts"
3934
            }
3935
          },
3936
          "end": "(/)([dgimsuvy]*)",
3937
          "endCaptures": {
3938
            "1": {
3939
              "name": "punctuation.definition.string.end.ts"
3940
            },
3941
            "2": {
3942
              "name": "keyword.other.ts"
3943
            }
3944
          },
3945
          "name": "string.regexp.ts",
3946
          "patterns": [
3947
            {
3948
              "include": "#regexp"
3949
            }
3950
          ]
3951
        },
3952
        {
3953
          "begin": "((?<![]$)_[:alnum:]]|\\+\\+|--|}|\\*/)|((?<=^return|[^$._[:alnum:]]return|^case|[^$._[:alnum:]]case))\\s*)/(?![*/])(?=(?:[^/\\[\\\\]|\\\\.|\\[([^]\\\\]|\\\\.)*])+/([dgimsuvy]+|(?![*/])|(?=/\\*))(?!\\s*[$0-9A-Z_a-z]))",
3954
          "beginCaptures": {
3955
            "0": {
3956
              "name": "punctuation.definition.string.begin.ts"
3957
            }
3958
          },
3959
          "end": "(/)([dgimsuvy]*)",
3960
          "endCaptures": {
3961
            "1": {
3962
              "name": "punctuation.definition.string.end.ts"
3963
            },
3964
            "2": {
3965
              "name": "keyword.other.ts"
3966
            }
3967
          },
3968
          "name": "string.regexp.ts",
3969
          "patterns": [
3970
            {
3971
              "include": "#regexp"
3972
            }
3973
          ]
3974
        }
3975
      ]
3976
    },
3977
    "regex-character-class": {
3978
      "patterns": [
3979
        {
3980
          "match": "\\\\[DSWdfnrstvw]|\\.",
3981
          "name": "constant.other.character-class.regexp"
3982
        },
3983
        {
3984
          "match": "\\\\([0-7]{3}|x\\h{2}|u\\h{4})",
3985
          "name": "constant.character.numeric.regexp"
3986
        },
3987
        {
3988
          "match": "\\\\c[A-Z]",
3989
          "name": "constant.character.control.regexp"
3990
        },
3991
        {
3992
          "match": "\\\\.",
3993
          "name": "constant.character.escape.backslash.regexp"
3994
        }
3995
      ]
3996
    },
3997
    "regexp": {
3998
      "patterns": [
3999
        {
4000
          "match": "\\\\[Bb]|[$^]",
4001
          "name": "keyword.control.anchor.regexp"
4002
        },
4003
        {
4004
          "captures": {
4005
            "0": {
4006
              "name": "keyword.other.back-reference.regexp"
4007
            },
4008
            "1": {
4009
              "name": "variable.other.regexp"
4010
            }
4011
          },
4012
          "match": "\\\\(?:[1-9]\\d*|k<([$A-Z_a-z][$\\w]*)>)"
4013
        },
4014
        {
4015
          "match": "[*+?]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)}\\??",
4016
          "name": "keyword.operator.quantifier.regexp"
4017
        },
4018
        {
4019
          "match": "\\|",
4020
          "name": "keyword.operator.or.regexp"
4021
        },
4022
        {
4023
          "begin": "(\\()((\\?=)|(\\?!)|(\\?<=)|(\\?<!))",
4024
          "beginCaptures": {
4025
            "1": {
4026
              "name": "punctuation.definition.group.regexp"
4027
            },
4028
            "2": {
4029
              "name": "punctuation.definition.group.assertion.regexp"
4030
            },
4031
            "3": {
4032
              "name": "meta.assertion.look-ahead.regexp"
4033
            },
4034
            "4": {
4035
              "name": "meta.assertion.negative-look-ahead.regexp"
4036
            },
4037
            "5": {
4038
              "name": "meta.assertion.look-behind.regexp"
4039
            },
4040
            "6": {
4041
              "name": "meta.assertion.negative-look-behind.regexp"
4042
            }
4043
          },
4044
          "end": "(\\))",
4045
          "endCaptures": {
4046
            "1": {
4047
              "name": "punctuation.definition.group.regexp"
4048
            }
4049
          },
4050
          "name": "meta.group.assertion.regexp",
4051
          "patterns": [
4052
            {
4053
              "include": "#regexp"
4054
            }
4055
          ]
4056
        },
4057
        {
4058
          "begin": "\\((?:(\\?:)|\\?<([$A-Z_a-z][$\\w]*)>)?",
4059
          "beginCaptures": {
4060
            "0": {
4061
              "name": "punctuation.definition.group.regexp"
4062
            },
4063
            "1": {
4064
              "name": "punctuation.definition.group.no-capture.regexp"
4065
            },
4066
            "2": {
4067
              "name": "variable.other.regexp"
4068
            }
4069
          },
4070
          "end": "\\)",
4071
          "endCaptures": {
4072
            "0": {
4073
              "name": "punctuation.definition.group.regexp"
4074
            }
4075
          },
4076
          "name": "meta.group.regexp",
4077
          "patterns": [
4078
            {
4079
              "include": "#regexp"
4080
            }
4081
          ]
4082
        },
4083
        {
4084
          "begin": "(\\[)(\\^)?",
4085
          "beginCaptures": {
4086
            "1": {
4087
              "name": "punctuation.definition.character-class.regexp"
4088
            },
4089
            "2": {
4090
              "name": "keyword.operator.negation.regexp"
4091
            }
4092
          },
4093
          "end": "(])",
4094
          "endCaptures": {
4095
            "1": {
4096
              "name": "punctuation.definition.character-class.regexp"
4097
            }
4098
          },
4099
          "name": "constant.other.character-class.set.regexp",
4100
          "patterns": [
4101
            {
4102
              "captures": {
4103
                "1": {
4104
                  "name": "constant.character.numeric.regexp"
4105
                },
4106
                "2": {
4107
                  "name": "constant.character.control.regexp"
4108
                },
4109
                "3": {
4110
                  "name": "constant.character.escape.backslash.regexp"
4111
                },
4112
                "4": {
4113
                  "name": "constant.character.numeric.regexp"
4114
                },
4115
                "5": {
4116
                  "name": "constant.character.control.regexp"
4117
                },
4118
                "6": {
4119
                  "name": "constant.character.escape.backslash.regexp"
4120
                }
4121
              },
4122
              "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h{2}|u\\h{4}))|(\\\\c[A-Z])|(\\\\.))-(?:[^]\\\\]|(\\\\(?:[0-7]{3}|x\\h{2}|u\\h{4}))|(\\\\c[A-Z])|(\\\\.))",
4123
              "name": "constant.other.character-class.range.regexp"
4124
            },
4125
            {
4126
              "include": "#regex-character-class"
4127
            }
4128
          ]
4129
        },
4130
        {
4131
          "include": "#regex-character-class"
4132
        }
4133
      ]
4134
    },
4135
    "return-type": {
4136
      "patterns": [
4137
        {
4138
          "begin": "(?<=\\))\\s*(:)(?=\\s*\\S)",
4139
          "beginCaptures": {
4140
            "1": {
4141
              "name": "keyword.operator.type.annotation.ts"
4142
            }
4143
          },
4144
          "end": "(?<![\\&:|])(?=$|^|[,;{}]|//)",
4145
          "name": "meta.return.type.ts",
4146
          "patterns": [
4147
            {
4148
              "include": "#return-type-core"
4149
            }
4150
          ]
4151
        },
4152
        {
4153
          "begin": "(?<=\\))\\s*(:)",
4154
          "beginCaptures": {
4155
            "1": {
4156
              "name": "keyword.operator.type.annotation.ts"
4157
            }
4158
          },
4159
          "end": "(?<![\\&:|])((?=[,;{}]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4160
          "name": "meta.return.type.ts",
4161
          "patterns": [
4162
            {
4163
              "include": "#return-type-core"
4164
            }
4165
          ]
4166
        }
4167
      ]
4168
    },
4169
    "return-type-core": {
4170
      "patterns": [
4171
        {
4172
          "include": "#comment"
4173
        },
4174
        {
4175
          "begin": "(?<=[\\&:|])(?=\\s*\\{)",
4176
          "end": "(?<=})",
4177
          "patterns": [
4178
            {
4179
              "include": "#type-object"
4180
            }
4181
          ]
4182
        },
4183
        {
4184
          "include": "#type-predicate-operator"
4185
        },
4186
        {
4187
          "include": "#type"
4188
        }
4189
      ]
4190
    },
4191
    "shebang": {
4192
      "captures": {
4193
        "1": {
4194
          "name": "punctuation.definition.comment.ts"
4195
        }
4196
      },
4197
      "match": "\\A(#!).*(?=$)",
4198
      "name": "comment.line.shebang.ts"
4199
    },
4200
    "single-line-comment-consuming-line-ending": {
4201
      "begin": "(^[\\t ]+)?((//)(?:\\s*((@)internal)(?=\\s|$))?)",
4202
      "beginCaptures": {
4203
        "1": {
4204
          "name": "punctuation.whitespace.comment.leading.ts"
4205
        },
4206
        "2": {
4207
          "name": "comment.line.double-slash.ts"
4208
        },
4209
        "3": {
4210
          "name": "punctuation.definition.comment.ts"
4211
        },
4212
        "4": {
4213
          "name": "storage.type.internaldeclaration.ts"
4214
        },
4215
        "5": {
4216
          "name": "punctuation.decorator.internaldeclaration.ts"
4217
        }
4218
      },
4219
      "contentName": "comment.line.double-slash.ts",
4220
      "end": "(?=^)"
4221
    },
4222
    "statements": {
4223
      "patterns": [
4224
        {
4225
          "include": "#declaration"
4226
        },
4227
        {
4228
          "include": "#control-statement"
4229
        },
4230
        {
4231
          "include": "#after-operator-block-as-object-literal"
4232
        },
4233
        {
4234
          "include": "#decl-block"
4235
        },
4236
        {
4237
          "include": "#label"
4238
        },
4239
        {
4240
          "include": "#expression"
4241
        },
4242
        {
4243
          "include": "#punctuation-semicolon"
4244
        },
4245
        {
4246
          "include": "#string"
4247
        },
4248
        {
4249
          "include": "#comment"
4250
        }
4251
      ]
4252
    },
4253
    "string": {
4254
      "patterns": [
4255
        {
4256
          "include": "#qstring-single"
4257
        },
4258
        {
4259
          "include": "#qstring-double"
4260
        },
4261
        {
4262
          "include": "#template"
4263
        }
4264
      ]
4265
    },
4266
    "string-character-escape": {
4267
      "match": "\\\\(x\\h{2}|u\\h{4}|u\\{\\h+}|[012][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)",
4268
      "name": "constant.character.escape.ts"
4269
    },
4270
    "super-literal": {
4271
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))super\\b(?!\\$)",
4272
      "name": "variable.language.super.ts"
4273
    },
4274
    "support-function-call-identifiers": {
4275
      "patterns": [
4276
        {
4277
          "include": "#literal"
4278
        },
4279
        {
4280
          "include": "#support-objects"
4281
        },
4282
        {
4283
          "include": "#object-identifiers"
4284
        },
4285
        {
4286
          "include": "#punctuation-accessor"
4287
        },
4288
        {
4289
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\(\\s*[\"'`])",
4290
          "name": "keyword.operator.expression.import.ts"
4291
        }
4292
      ]
4293
    },
4294
    "support-objects": {
4295
      "patterns": [
4296
        {
4297
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(arguments)\\b(?!\\$)",
4298
          "name": "variable.language.arguments.ts"
4299
        },
4300
        {
4301
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(Promise)\\b(?!\\$)",
4302
          "name": "support.class.promise.ts"
4303
        },
4304
        {
4305
          "captures": {
4306
            "1": {
4307
              "name": "keyword.control.import.ts"
4308
            },
4309
            "2": {
4310
              "name": "punctuation.accessor.ts"
4311
            },
4312
            "3": {
4313
              "name": "punctuation.accessor.optional.ts"
4314
            },
4315
            "4": {
4316
              "name": "support.variable.property.importmeta.ts"
4317
            }
4318
          },
4319
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(import)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(meta)\\b(?!\\$)"
4320
        },
4321
        {
4322
          "captures": {
4323
            "1": {
4324
              "name": "keyword.operator.new.ts"
4325
            },
4326
            "2": {
4327
              "name": "punctuation.accessor.ts"
4328
            },
4329
            "3": {
4330
              "name": "punctuation.accessor.optional.ts"
4331
            },
4332
            "4": {
4333
              "name": "support.variable.property.target.ts"
4334
            }
4335
          },
4336
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(new)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(target)\\b(?!\\$)"
4337
        },
4338
        {
4339
          "captures": {
4340
            "1": {
4341
              "name": "punctuation.accessor.ts"
4342
            },
4343
            "2": {
4344
              "name": "punctuation.accessor.optional.ts"
4345
            },
4346
            "3": {
4347
              "name": "support.variable.property.ts"
4348
            },
4349
            "4": {
4350
              "name": "support.constant.ts"
4351
            }
4352
          },
4353
          "match": "(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(?:(constructor|length|prototype|__proto__)\\b(?!\\$|\\s*(<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\()|(EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY)\\b(?!\\$))"
4354
        },
4355
        {
4356
          "captures": {
4357
            "1": {
4358
              "name": "support.type.object.module.ts"
4359
            },
4360
            "2": {
4361
              "name": "support.type.object.module.ts"
4362
            },
4363
            "3": {
4364
              "name": "punctuation.accessor.ts"
4365
            },
4366
            "4": {
4367
              "name": "punctuation.accessor.optional.ts"
4368
            },
4369
            "5": {
4370
              "name": "support.type.object.module.ts"
4371
            }
4372
          },
4373
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(exports)|(module)(?:(?:(\\.)|(\\?\\.(?!\\s*\\d)))(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)"
4374
        }
4375
      ]
4376
    },
4377
    "switch-statement": {
4378
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?=\\bswitch\\s*\\()",
4379
      "end": "}",
4380
      "endCaptures": {
4381
        "0": {
4382
          "name": "punctuation.definition.block.ts"
4383
        }
4384
      },
4385
      "name": "switch-statement.expr.ts",
4386
      "patterns": [
4387
        {
4388
          "include": "#comment"
4389
        },
4390
        {
4391
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(switch)\\s*(\\()",
4392
          "beginCaptures": {
4393
            "1": {
4394
              "name": "keyword.control.switch.ts"
4395
            },
4396
            "2": {
4397
              "name": "meta.brace.round.ts"
4398
            }
4399
          },
4400
          "end": "\\)",
4401
          "endCaptures": {
4402
            "0": {
4403
              "name": "meta.brace.round.ts"
4404
            }
4405
          },
4406
          "name": "switch-expression.expr.ts",
4407
          "patterns": [
4408
            {
4409
              "include": "#expression"
4410
            }
4411
          ]
4412
        },
4413
        {
4414
          "begin": "\\{",
4415
          "beginCaptures": {
4416
            "0": {
4417
              "name": "punctuation.definition.block.ts"
4418
            }
4419
          },
4420
          "end": "(?=})",
4421
          "name": "switch-block.expr.ts",
4422
          "patterns": [
4423
            {
4424
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(case|default(?=:))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4425
              "beginCaptures": {
4426
                "1": {
4427
                  "name": "keyword.control.switch.ts"
4428
                }
4429
              },
4430
              "end": "(?=:)",
4431
              "name": "case-clause.expr.ts",
4432
              "patterns": [
4433
                {
4434
                  "include": "#expression"
4435
                }
4436
              ]
4437
            },
4438
            {
4439
              "begin": "(:)\\s*(\\{)",
4440
              "beginCaptures": {
4441
                "1": {
4442
                  "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
4443
                },
4444
                "2": {
4445
                  "name": "meta.block.ts punctuation.definition.block.ts"
4446
                }
4447
              },
4448
              "contentName": "meta.block.ts",
4449
              "end": "}",
4450
              "endCaptures": {
4451
                "0": {
4452
                  "name": "meta.block.ts punctuation.definition.block.ts"
4453
                }
4454
              },
4455
              "patterns": [
4456
                {
4457
                  "include": "#statements"
4458
                }
4459
              ]
4460
            },
4461
            {
4462
              "captures": {
4463
                "0": {
4464
                  "name": "case-clause.expr.ts punctuation.definition.section.case-statement.ts"
4465
                }
4466
              },
4467
              "match": "(:)"
4468
            },
4469
            {
4470
              "include": "#statements"
4471
            }
4472
          ]
4473
        }
4474
      ]
4475
    },
4476
    "template": {
4477
      "patterns": [
4478
        {
4479
          "include": "#template-call"
4480
        },
4481
        {
4482
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)?(`)",
4483
          "beginCaptures": {
4484
            "1": {
4485
              "name": "entity.name.function.tagged-template.ts"
4486
            },
4487
            "2": {
4488
              "name": "string.template.ts punctuation.definition.string.template.begin.ts"
4489
            }
4490
          },
4491
          "contentName": "string.template.ts",
4492
          "end": "`",
4493
          "endCaptures": {
4494
            "0": {
4495
              "name": "string.template.ts punctuation.definition.string.template.end.ts"
4496
            }
4497
          },
4498
          "patterns": [
4499
            {
4500
              "include": "#template-substitution-element"
4501
            },
4502
            {
4503
              "include": "#string-character-escape"
4504
            }
4505
          ]
4506
        }
4507
      ]
4508
    },
4509
    "template-call": {
4510
      "patterns": [
4511
        {
4512
          "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*)?`)",
4513
          "end": "(?=`)",
4514
          "patterns": [
4515
            {
4516
              "begin": "(?=(([$_[:alpha:]][$_[:alnum:]]*\\s*\\??\\.\\s*)*|(\\??\\.\\s*)?)([$_[:alpha:]][$_[:alnum:]]*))",
4517
              "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*)?`)",
4518
              "patterns": [
4519
                {
4520
                  "include": "#support-function-call-identifiers"
4521
                },
4522
                {
4523
                  "match": "([$_[:alpha:]][$_[:alnum:]]*)",
4524
                  "name": "entity.name.function.tagged-template.ts"
4525
                }
4526
              ]
4527
            },
4528
            {
4529
              "include": "#type-arguments"
4530
            }
4531
          ]
4532
        },
4533
        {
4534
          "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*)`)",
4535
          "beginCaptures": {
4536
            "1": {
4537
              "name": "entity.name.function.tagged-template.ts"
4538
            }
4539
          },
4540
          "end": "(?=`)",
4541
          "patterns": [
4542
            {
4543
              "include": "#type-arguments"
4544
            }
4545
          ]
4546
        }
4547
      ]
4548
    },
4549
    "template-substitution-element": {
4550
      "begin": "\\$\\{",
4551
      "beginCaptures": {
4552
        "0": {
4553
          "name": "punctuation.definition.template-expression.begin.ts"
4554
        }
4555
      },
4556
      "contentName": "meta.embedded.line.ts",
4557
      "end": "}",
4558
      "endCaptures": {
4559
        "0": {
4560
          "name": "punctuation.definition.template-expression.end.ts"
4561
        }
4562
      },
4563
      "name": "meta.template.expression.ts",
4564
      "patterns": [
4565
        {
4566
          "include": "#expression"
4567
        }
4568
      ]
4569
    },
4570
    "template-type": {
4571
      "patterns": [
4572
        {
4573
          "include": "#template-call"
4574
        },
4575
        {
4576
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)?(`)",
4577
          "beginCaptures": {
4578
            "1": {
4579
              "name": "entity.name.function.tagged-template.ts"
4580
            },
4581
            "2": {
4582
              "name": "string.template.ts punctuation.definition.string.template.begin.ts"
4583
            }
4584
          },
4585
          "contentName": "string.template.ts",
4586
          "end": "`",
4587
          "endCaptures": {
4588
            "0": {
4589
              "name": "string.template.ts punctuation.definition.string.template.end.ts"
4590
            }
4591
          },
4592
          "patterns": [
4593
            {
4594
              "include": "#template-type-substitution-element"
4595
            },
4596
            {
4597
              "include": "#string-character-escape"
4598
            }
4599
          ]
4600
        }
4601
      ]
4602
    },
4603
    "template-type-substitution-element": {
4604
      "begin": "\\$\\{",
4605
      "beginCaptures": {
4606
        "0": {
4607
          "name": "punctuation.definition.template-expression.begin.ts"
4608
        }
4609
      },
4610
      "contentName": "meta.embedded.line.ts",
4611
      "end": "}",
4612
      "endCaptures": {
4613
        "0": {
4614
          "name": "punctuation.definition.template-expression.end.ts"
4615
        }
4616
      },
4617
      "name": "meta.template.expression.ts",
4618
      "patterns": [
4619
        {
4620
          "include": "#type"
4621
        }
4622
      ]
4623
    },
4624
    "ternary-expression": {
4625
      "begin": "(?!\\?\\.\\s*\\D)(\\?)(?!\\?)",
4626
      "beginCaptures": {
4627
        "1": {
4628
          "name": "keyword.operator.ternary.ts"
4629
        }
4630
      },
4631
      "end": "\\s*(:)",
4632
      "endCaptures": {
4633
        "1": {
4634
          "name": "keyword.operator.ternary.ts"
4635
        }
4636
      },
4637
      "patterns": [
4638
        {
4639
          "include": "#expression"
4640
        }
4641
      ]
4642
    },
4643
    "this-literal": {
4644
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))this\\b(?!\\$)",
4645
      "name": "variable.language.this.ts"
4646
    },
4647
    "type": {
4648
      "patterns": [
4649
        {
4650
          "include": "#comment"
4651
        },
4652
        {
4653
          "include": "#type-string"
4654
        },
4655
        {
4656
          "include": "#numeric-literal"
4657
        },
4658
        {
4659
          "include": "#type-primitive"
4660
        },
4661
        {
4662
          "include": "#type-builtin-literals"
4663
        },
4664
        {
4665
          "include": "#type-parameters"
4666
        },
4667
        {
4668
          "include": "#type-tuple"
4669
        },
4670
        {
4671
          "include": "#type-object"
4672
        },
4673
        {
4674
          "include": "#type-operators"
4675
        },
4676
        {
4677
          "include": "#type-conditional"
4678
        },
4679
        {
4680
          "include": "#type-fn-type-parameters"
4681
        },
4682
        {
4683
          "include": "#type-paren-or-function-parameters"
4684
        },
4685
        {
4686
          "include": "#type-function-return-type"
4687
        },
4688
        {
4689
          "captures": {
4690
            "1": {
4691
              "name": "storage.modifier.ts"
4692
            }
4693
          },
4694
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(readonly)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*"
4695
        },
4696
        {
4697
          "include": "#type-name"
4698
        }
4699
      ]
4700
    },
4701
    "type-alias-declaration": {
4702
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(type)\\b\\s+([$_[:alpha:]][$_[:alnum:]]*)\\s*",
4703
      "beginCaptures": {
4704
        "1": {
4705
          "name": "keyword.control.export.ts"
4706
        },
4707
        "2": {
4708
          "name": "storage.modifier.ts"
4709
        },
4710
        "3": {
4711
          "name": "storage.type.type.ts"
4712
        },
4713
        "4": {
4714
          "name": "entity.name.type.alias.ts"
4715
        }
4716
      },
4717
      "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)",
4718
      "name": "meta.type.declaration.ts",
4719
      "patterns": [
4720
        {
4721
          "include": "#comment"
4722
        },
4723
        {
4724
          "include": "#type-parameters"
4725
        },
4726
        {
4727
          "begin": "(=)\\s*(intrinsic)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4728
          "beginCaptures": {
4729
            "1": {
4730
              "name": "keyword.operator.assignment.ts"
4731
            },
4732
            "2": {
4733
              "name": "keyword.control.intrinsic.ts"
4734
            }
4735
          },
4736
          "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)",
4737
          "patterns": [
4738
            {
4739
              "include": "#type"
4740
            }
4741
          ]
4742
        },
4743
        {
4744
          "begin": "(=)\\s*",
4745
          "beginCaptures": {
4746
            "1": {
4747
              "name": "keyword.operator.assignment.ts"
4748
            }
4749
          },
4750
          "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)",
4751
          "patterns": [
4752
            {
4753
              "include": "#type"
4754
            }
4755
          ]
4756
        }
4757
      ]
4758
    },
4759
    "type-annotation": {
4760
      "patterns": [
4761
        {
4762
          "begin": "(:)(?=\\s*\\S)",
4763
          "beginCaptures": {
4764
            "1": {
4765
              "name": "keyword.operator.type.annotation.ts"
4766
            }
4767
          },
4768
          "end": "(?<![\\&:|])(?!\\s*[\\&|]\\s+)((?=^|[]),;}]|//)|(?==[^>])|((?<=[]$)>_}[:alpha:]])\\s*(?=\\{)))",
4769
          "name": "meta.type.annotation.ts",
4770
          "patterns": [
4771
            {
4772
              "include": "#type"
4773
            }
4774
          ]
4775
        },
4776
        {
4777
          "begin": "(:)",
4778
          "beginCaptures": {
4779
            "1": {
4780
              "name": "keyword.operator.type.annotation.ts"
4781
            }
4782
          },
4783
          "end": "(?<![\\&:|])((?=[]),;}]|//)|(?==[^>])|(?=^\\s*$)|((?<=[]$)>_}[:alpha:]])\\s*(?=\\{)))",
4784
          "name": "meta.type.annotation.ts",
4785
          "patterns": [
4786
            {
4787
              "include": "#type"
4788
            }
4789
          ]
4790
        }
4791
      ]
4792
    },
4793
    "type-arguments": {
4794
      "begin": "<",
4795
      "beginCaptures": {
4796
        "0": {
4797
          "name": "punctuation.definition.typeparameters.begin.ts"
4798
        }
4799
      },
4800
      "end": ">",
4801
      "endCaptures": {
4802
        "0": {
4803
          "name": "punctuation.definition.typeparameters.end.ts"
4804
        }
4805
      },
4806
      "name": "meta.type.parameters.ts",
4807
      "patterns": [
4808
        {
4809
          "include": "#type-arguments-body"
4810
        }
4811
      ]
4812
    },
4813
    "type-arguments-body": {
4814
      "patterns": [
4815
        {
4816
          "captures": {
4817
            "0": {
4818
              "name": "keyword.operator.type.ts"
4819
            }
4820
          },
4821
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(_)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
4822
        },
4823
        {
4824
          "include": "#type"
4825
        },
4826
        {
4827
          "include": "#punctuation-comma"
4828
        }
4829
      ]
4830
    },
4831
    "type-builtin-literals": {
4832
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(this|true|false|undefined|null|object)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
4833
      "name": "support.type.builtin.ts"
4834
    },
4835
    "type-conditional": {
4836
      "patterns": [
4837
        {
4838
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends)\\s+",
4839
          "beginCaptures": {
4840
            "1": {
4841
              "name": "storage.modifier.ts"
4842
            }
4843
          },
4844
          "end": "(?<=:)",
4845
          "patterns": [
4846
            {
4847
              "begin": "\\?",
4848
              "beginCaptures": {
4849
                "0": {
4850
                  "name": "keyword.operator.ternary.ts"
4851
                }
4852
              },
4853
              "end": ":",
4854
              "endCaptures": {
4855
                "0": {
4856
                  "name": "keyword.operator.ternary.ts"
4857
                }
4858
              },
4859
              "patterns": [
4860
                {
4861
                  "include": "#type"
4862
                }
4863
              ]
4864
            },
4865
            {
4866
              "include": "#type"
4867
            }
4868
          ]
4869
        }
4870
      ]
4871
    },
4872
    "type-fn-type-parameters": {
4873
      "patterns": [
4874
        {
4875
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b(?=\\s*<)",
4876
          "beginCaptures": {
4877
            "1": {
4878
              "name": "meta.type.constructor.ts storage.modifier.ts"
4879
            },
4880
            "2": {
4881
              "name": "meta.type.constructor.ts keyword.control.new.ts"
4882
            }
4883
          },
4884
          "end": "(?<=>)",
4885
          "patterns": [
4886
            {
4887
              "include": "#comment"
4888
            },
4889
            {
4890
              "include": "#type-parameters"
4891
            }
4892
          ]
4893
        },
4894
        {
4895
          "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(abstract)\\s+)?(new)\\b\\s*(?=\\()",
4896
          "beginCaptures": {
4897
            "1": {
4898
              "name": "storage.modifier.ts"
4899
            },
4900
            "2": {
4901
              "name": "keyword.control.new.ts"
4902
            }
4903
          },
4904
          "end": "(?<=\\))",
4905
          "name": "meta.type.constructor.ts",
4906
          "patterns": [
4907
            {
4908
              "include": "#function-parameters"
4909
            }
4910
          ]
4911
        },
4912
        {
4913
          "begin": "((?=\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>))))))",
4914
          "end": "(?<=\\))",
4915
          "name": "meta.type.function.ts",
4916
          "patterns": [
4917
            {
4918
              "include": "#function-parameters"
4919
            }
4920
          ]
4921
        }
4922
      ]
4923
    },
4924
    "type-function-return-type": {
4925
      "patterns": [
4926
        {
4927
          "begin": "(=>)(?=\\s*\\S)",
4928
          "beginCaptures": {
4929
            "1": {
4930
              "name": "storage.type.function.arrow.ts"
4931
            }
4932
          },
4933
          "end": "(?<!=>)(?<![\\&|])(?=[]),:;=>?{}]|//|$)",
4934
          "name": "meta.type.function.return.ts",
4935
          "patterns": [
4936
            {
4937
              "include": "#type-function-return-type-core"
4938
            }
4939
          ]
4940
        },
4941
        {
4942
          "begin": "=>",
4943
          "beginCaptures": {
4944
            "0": {
4945
              "name": "storage.type.function.arrow.ts"
4946
            }
4947
          },
4948
          "end": "(?<!=>)(?<![\\&|])((?=[]),:;=>?{}]|//|^\\s*$)|((?<=\\S)(?=\\s*$)))",
4949
          "name": "meta.type.function.return.ts",
4950
          "patterns": [
4951
            {
4952
              "include": "#type-function-return-type-core"
4953
            }
4954
          ]
4955
        }
4956
      ]
4957
    },
4958
    "type-function-return-type-core": {
4959
      "patterns": [
4960
        {
4961
          "include": "#comment"
4962
        },
4963
        {
4964
          "begin": "(?<==>)(?=\\s*\\{)",
4965
          "end": "(?<=})",
4966
          "patterns": [
4967
            {
4968
              "include": "#type-object"
4969
            }
4970
          ]
4971
        },
4972
        {
4973
          "include": "#type-predicate-operator"
4974
        },
4975
        {
4976
          "include": "#type"
4977
        }
4978
      ]
4979
    },
4980
    "type-infer": {
4981
      "patterns": [
4982
        {
4983
          "captures": {
4984
            "1": {
4985
              "name": "keyword.operator.expression.infer.ts"
4986
            },
4987
            "2": {
4988
              "name": "entity.name.type.ts"
4989
            },
4990
            "3": {
4991
              "name": "keyword.operator.expression.extends.ts"
4992
            }
4993
          },
4994
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(infer)\\s+([$_[:alpha:]][$_[:alnum:]]*)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))(?:\\s+(extends)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))?",
4995
          "name": "meta.type.infer.ts"
4996
        }
4997
      ]
4998
    },
4999
    "type-name": {
5000
      "patterns": [
5001
        {
5002
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))\\s*(<)",
5003
          "captures": {
5004
            "1": {
5005
              "name": "entity.name.type.module.ts"
5006
            },
5007
            "2": {
5008
              "name": "punctuation.accessor.ts"
5009
            },
5010
            "3": {
5011
              "name": "punctuation.accessor.optional.ts"
5012
            },
5013
            "4": {
5014
              "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
5015
            }
5016
          },
5017
          "contentName": "meta.type.parameters.ts",
5018
          "end": "(>)",
5019
          "endCaptures": {
5020
            "1": {
5021
              "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
5022
            }
5023
          },
5024
          "patterns": [
5025
            {
5026
              "include": "#type-arguments-body"
5027
            }
5028
          ]
5029
        },
5030
        {
5031
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(<)",
5032
          "beginCaptures": {
5033
            "1": {
5034
              "name": "entity.name.type.ts"
5035
            },
5036
            "2": {
5037
              "name": "meta.type.parameters.ts punctuation.definition.typeparameters.begin.ts"
5038
            }
5039
          },
5040
          "contentName": "meta.type.parameters.ts",
5041
          "end": "(>)",
5042
          "endCaptures": {
5043
            "1": {
5044
              "name": "meta.type.parameters.ts punctuation.definition.typeparameters.end.ts"
5045
            }
5046
          },
5047
          "patterns": [
5048
            {
5049
              "include": "#type-arguments-body"
5050
            }
5051
          ]
5052
        },
5053
        {
5054
          "captures": {
5055
            "1": {
5056
              "name": "entity.name.type.module.ts"
5057
            },
5058
            "2": {
5059
              "name": "punctuation.accessor.ts"
5060
            },
5061
            "3": {
5062
              "name": "punctuation.accessor.optional.ts"
5063
            }
5064
          },
5065
          "match": "([$_[:alpha:]][$_[:alnum:]]*)\\s*(?:(\\.)|(\\?\\.(?!\\s*\\d)))"
5066
        },
5067
        {
5068
          "match": "[$_[:alpha:]][$_[:alnum:]]*",
5069
          "name": "entity.name.type.ts"
5070
        }
5071
      ]
5072
    },
5073
    "type-object": {
5074
      "begin": "\\{",
5075
      "beginCaptures": {
5076
        "0": {
5077
          "name": "punctuation.definition.block.ts"
5078
        }
5079
      },
5080
      "end": "}",
5081
      "endCaptures": {
5082
        "0": {
5083
          "name": "punctuation.definition.block.ts"
5084
        }
5085
      },
5086
      "name": "meta.object.type.ts",
5087
      "patterns": [
5088
        {
5089
          "include": "#comment"
5090
        },
5091
        {
5092
          "include": "#method-declaration"
5093
        },
5094
        {
5095
          "include": "#indexer-declaration"
5096
        },
5097
        {
5098
          "include": "#indexer-mapped-type-declaration"
5099
        },
5100
        {
5101
          "include": "#field-declaration"
5102
        },
5103
        {
5104
          "include": "#type-annotation"
5105
        },
5106
        {
5107
          "begin": "\\.\\.\\.",
5108
          "beginCaptures": {
5109
            "0": {
5110
              "name": "keyword.operator.spread.ts"
5111
            }
5112
          },
5113
          "end": "(?=[,;}]|$)|(?<=})",
5114
          "patterns": [
5115
            {
5116
              "include": "#type"
5117
            }
5118
          ]
5119
        },
5120
        {
5121
          "include": "#punctuation-comma"
5122
        },
5123
        {
5124
          "include": "#punctuation-semicolon"
5125
        },
5126
        {
5127
          "include": "#type"
5128
        }
5129
      ]
5130
    },
5131
    "type-operators": {
5132
      "patterns": [
5133
        {
5134
          "include": "#typeof-operator"
5135
        },
5136
        {
5137
          "include": "#type-infer"
5138
        },
5139
        {
5140
          "begin": "([\\&|])(?=\\s*\\{)",
5141
          "beginCaptures": {
5142
            "0": {
5143
              "name": "keyword.operator.type.ts"
5144
            }
5145
          },
5146
          "end": "(?<=})",
5147
          "patterns": [
5148
            {
5149
              "include": "#type-object"
5150
            }
5151
          ]
5152
        },
5153
        {
5154
          "begin": "[\\&|]",
5155
          "beginCaptures": {
5156
            "0": {
5157
              "name": "keyword.operator.type.ts"
5158
            }
5159
          },
5160
          "end": "(?=\\S)"
5161
        },
5162
        {
5163
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))keyof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5164
          "name": "keyword.operator.expression.keyof.ts"
5165
        },
5166
        {
5167
          "match": "([:?])",
5168
          "name": "keyword.operator.ternary.ts"
5169
        },
5170
        {
5171
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))import(?=\\s*\\()",
5172
          "name": "keyword.operator.expression.import.ts"
5173
        }
5174
      ]
5175
    },
5176
    "type-parameters": {
5177
      "begin": "(<)",
5178
      "beginCaptures": {
5179
        "1": {
5180
          "name": "punctuation.definition.typeparameters.begin.ts"
5181
        }
5182
      },
5183
      "end": "(>)",
5184
      "endCaptures": {
5185
        "1": {
5186
          "name": "punctuation.definition.typeparameters.end.ts"
5187
        }
5188
      },
5189
      "name": "meta.type.parameters.ts",
5190
      "patterns": [
5191
        {
5192
          "include": "#comment"
5193
        },
5194
        {
5195
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(extends|in|out|const)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5196
          "name": "storage.modifier.ts"
5197
        },
5198
        {
5199
          "include": "#type"
5200
        },
5201
        {
5202
          "include": "#punctuation-comma"
5203
        },
5204
        {
5205
          "match": "(=)(?!>)",
5206
          "name": "keyword.operator.assignment.ts"
5207
        }
5208
      ]
5209
    },
5210
    "type-paren-or-function-parameters": {
5211
      "begin": "\\(",
5212
      "beginCaptures": {
5213
        "0": {
5214
          "name": "meta.brace.round.ts"
5215
        }
5216
      },
5217
      "end": "\\)",
5218
      "endCaptures": {
5219
        "0": {
5220
          "name": "meta.brace.round.ts"
5221
        }
5222
      },
5223
      "name": "meta.type.paren.cover.ts",
5224
      "patterns": [
5225
        {
5226
          "captures": {
5227
            "1": {
5228
              "name": "storage.modifier.ts"
5229
            },
5230
            "2": {
5231
              "name": "keyword.operator.rest.ts"
5232
            },
5233
            "3": {
5234
              "name": "entity.name.function.ts variable.language.this.ts"
5235
            },
5236
            "4": {
5237
              "name": "entity.name.function.ts"
5238
            },
5239
            "5": {
5240
              "name": "keyword.operator.optional.ts"
5241
            }
5242
          },
5243
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))\\s*(\\??)(?=\\s*(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\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*))))))))"
5244
        },
5245
        {
5246
          "captures": {
5247
            "1": {
5248
              "name": "storage.modifier.ts"
5249
            },
5250
            "2": {
5251
              "name": "keyword.operator.rest.ts"
5252
            },
5253
            "3": {
5254
              "name": "variable.parameter.ts variable.language.this.ts"
5255
            },
5256
            "4": {
5257
              "name": "variable.parameter.ts"
5258
            },
5259
            "5": {
5260
              "name": "keyword.operator.optional.ts"
5261
            }
5262
          },
5263
          "match": "(?:(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(public|private|protected|readonly)\\s+)?(?:(\\.\\.\\.)\\s*)?(?<![:=])(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))\\s*(\\??)(?=:)"
5264
        },
5265
        {
5266
          "include": "#type-annotation"
5267
        },
5268
        {
5269
          "match": ",",
5270
          "name": "punctuation.separator.parameter.ts"
5271
        },
5272
        {
5273
          "include": "#type"
5274
        }
5275
      ]
5276
    },
5277
    "type-predicate-operator": {
5278
      "patterns": [
5279
        {
5280
          "captures": {
5281
            "1": {
5282
              "name": "keyword.operator.type.asserts.ts"
5283
            },
5284
            "2": {
5285
              "name": "variable.parameter.ts variable.language.this.ts"
5286
            },
5287
            "3": {
5288
              "name": "variable.parameter.ts"
5289
            },
5290
            "4": {
5291
              "name": "keyword.operator.expression.is.ts"
5292
            }
5293
          },
5294
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:(asserts)\\s+)?(?!asserts)(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))\\s(is)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
5295
        },
5296
        {
5297
          "captures": {
5298
            "1": {
5299
              "name": "keyword.operator.type.asserts.ts"
5300
            },
5301
            "2": {
5302
              "name": "variable.parameter.ts variable.language.this.ts"
5303
            },
5304
            "3": {
5305
              "name": "variable.parameter.ts"
5306
            }
5307
          },
5308
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(asserts)\\s+(?!is)(?:(this)|([$_[:alpha:]][$_[:alnum:]]*))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))"
5309
        },
5310
        {
5311
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))asserts(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5312
          "name": "keyword.operator.type.asserts.ts"
5313
        },
5314
        {
5315
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))is(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5316
          "name": "keyword.operator.expression.is.ts"
5317
        }
5318
      ]
5319
    },
5320
    "type-primitive": {
5321
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(string|number|bigint|boolean|symbol|any|void|never|unknown)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5322
      "name": "support.type.primitive.ts"
5323
    },
5324
    "type-string": {
5325
      "patterns": [
5326
        {
5327
          "include": "#qstring-single"
5328
        },
5329
        {
5330
          "include": "#qstring-double"
5331
        },
5332
        {
5333
          "include": "#template-type"
5334
        }
5335
      ]
5336
    },
5337
    "type-tuple": {
5338
      "begin": "\\[",
5339
      "beginCaptures": {
5340
        "0": {
5341
          "name": "meta.brace.square.ts"
5342
        }
5343
      },
5344
      "end": "]",
5345
      "endCaptures": {
5346
        "0": {
5347
          "name": "meta.brace.square.ts"
5348
        }
5349
      },
5350
      "name": "meta.type.tuple.ts",
5351
      "patterns": [
5352
        {
5353
          "match": "\\.\\.\\.",
5354
          "name": "keyword.operator.rest.ts"
5355
        },
5356
        {
5357
          "captures": {
5358
            "1": {
5359
              "name": "entity.name.label.ts"
5360
            },
5361
            "2": {
5362
              "name": "keyword.operator.optional.ts"
5363
            },
5364
            "3": {
5365
              "name": "punctuation.separator.label.ts"
5366
            }
5367
          },
5368
          "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))([$_[:alpha:]][$_[:alnum:]]*)\\s*(\\?)?\\s*(:)"
5369
        },
5370
        {
5371
          "include": "#type"
5372
        },
5373
        {
5374
          "include": "#punctuation-comma"
5375
        }
5376
      ]
5377
    },
5378
    "typeof-operator": {
5379
      "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))typeof(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5380
      "beginCaptures": {
5381
        "0": {
5382
          "name": "keyword.operator.expression.typeof.ts"
5383
        }
5384
      },
5385
      "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)",
5386
      "patterns": [
5387
        {
5388
          "include": "#type-arguments"
5389
        },
5390
        {
5391
          "include": "#expression"
5392
        }
5393
      ]
5394
    },
5395
    "undefined-literal": {
5396
      "match": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))undefined(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))",
5397
      "name": "constant.language.undefined.ts"
5398
    },
5399
    "var-expr": {
5400
      "patterns": [
5401
        {
5402
          "begin": "(?=(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(var|let)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
5403
          "end": "(?!(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\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*$)))",
5404
          "name": "meta.var.expr.ts",
5405
          "patterns": [
5406
            {
5407
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(var|let)(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
5408
              "beginCaptures": {
5409
                "1": {
5410
                  "name": "keyword.control.export.ts"
5411
                },
5412
                "2": {
5413
                  "name": "storage.modifier.ts"
5414
                },
5415
                "3": {
5416
                  "name": "storage.type.ts"
5417
                }
5418
              },
5419
              "end": "(?=\\S)"
5420
            },
5421
            {
5422
              "include": "#destructuring-variable"
5423
            },
5424
            {
5425
              "include": "#var-single-variable"
5426
            },
5427
            {
5428
              "include": "#variable-initializer"
5429
            },
5430
            {
5431
              "include": "#comment"
5432
            },
5433
            {
5434
              "begin": "(,)\\s*(?=$|//)",
5435
              "beginCaptures": {
5436
                "1": {
5437
                  "name": "punctuation.separator.comma.ts"
5438
                }
5439
              },
5440
              "end": "(?<!,)(((?=[;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
5441
              "patterns": [
5442
                {
5443
                  "include": "#single-line-comment-consuming-line-ending"
5444
                },
5445
                {
5446
                  "include": "#comment"
5447
                },
5448
                {
5449
                  "include": "#destructuring-variable"
5450
                },
5451
                {
5452
                  "include": "#var-single-variable"
5453
                },
5454
                {
5455
                  "include": "#punctuation-comma"
5456
                }
5457
              ]
5458
            },
5459
            {
5460
              "include": "#punctuation-comma"
5461
            }
5462
          ]
5463
        },
5464
        {
5465
          "begin": "(?=(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(const(?!\\s+enum\\b))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
5466
          "beginCaptures": {
5467
            "1": {
5468
              "name": "keyword.control.export.ts"
5469
            },
5470
            "2": {
5471
              "name": "storage.modifier.ts"
5472
            },
5473
            "3": {
5474
              "name": "storage.type.ts"
5475
            }
5476
          },
5477
          "end": "(?!(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\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)|((?<!(?:^|[^$._[:alnum:]])const)(?=\\s*$)))",
5478
          "name": "meta.var.expr.ts",
5479
          "patterns": [
5480
            {
5481
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b(const(?!\\s+enum\\b))(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
5482
              "beginCaptures": {
5483
                "1": {
5484
                  "name": "keyword.control.export.ts"
5485
                },
5486
                "2": {
5487
                  "name": "storage.modifier.ts"
5488
                },
5489
                "3": {
5490
                  "name": "storage.type.ts"
5491
                }
5492
              },
5493
              "end": "(?=\\S)"
5494
            },
5495
            {
5496
              "include": "#destructuring-const"
5497
            },
5498
            {
5499
              "include": "#var-single-const"
5500
            },
5501
            {
5502
              "include": "#variable-initializer"
5503
            },
5504
            {
5505
              "include": "#comment"
5506
            },
5507
            {
5508
              "begin": "(,)\\s*(?=$|//)",
5509
              "beginCaptures": {
5510
                "1": {
5511
                  "name": "punctuation.separator.comma.ts"
5512
                }
5513
              },
5514
              "end": "(?<!,)(((?=[;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
5515
              "patterns": [
5516
                {
5517
                  "include": "#single-line-comment-consuming-line-ending"
5518
                },
5519
                {
5520
                  "include": "#comment"
5521
                },
5522
                {
5523
                  "include": "#destructuring-const"
5524
                },
5525
                {
5526
                  "include": "#var-single-const"
5527
                },
5528
                {
5529
                  "include": "#punctuation-comma"
5530
                }
5531
              ]
5532
            },
5533
            {
5534
              "include": "#punctuation-comma"
5535
            }
5536
          ]
5537
        },
5538
        {
5539
          "begin": "(?=(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b\\b(using(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])|await\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b)\\b(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))",
5540
          "beginCaptures": {
5541
            "1": {
5542
              "name": "keyword.control.export.ts"
5543
            },
5544
            "2": {
5545
              "name": "storage.modifier.ts"
5546
            },
5547
            "3": {
5548
              "name": "storage.type.ts"
5549
            }
5550
          },
5551
          "end": "(?!(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b\\b(using(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])|await\\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)|((?<!(?:^|[^$._[:alnum:]]|^await\\s+|[^$._[:alnum:]]await\\s+)using)(?=\\s*$)))",
5552
          "name": "meta.var.expr.ts",
5553
          "patterns": [
5554
            {
5555
              "begin": "(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(?:\\b(export)\\s+)?(?:\\b(declare)\\s+)?\\b\\b(using(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])|await\\s+\\busing(?=\\s+(?!in\\b|of\\b(?!\\s*(?:of\\b|=)))[$_[:alpha:]])\\b)\\b(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.))\\s*",
5556
              "beginCaptures": {
5557
                "1": {
5558
                  "name": "keyword.control.export.ts"
5559
                },
5560
                "2": {
5561
                  "name": "storage.modifier.ts"
5562
                },
5563
                "3": {
5564
                  "name": "storage.type.ts"
5565
                }
5566
              },
5567
              "end": "(?=\\S)"
5568
            },
5569
            {
5570
              "include": "#var-single-const"
5571
            },
5572
            {
5573
              "include": "#variable-initializer"
5574
            },
5575
            {
5576
              "include": "#comment"
5577
            },
5578
            {
5579
              "begin": "(,)\\s*((?!\\S)|(?=//))",
5580
              "beginCaptures": {
5581
                "1": {
5582
                  "name": "punctuation.separator.comma.ts"
5583
                }
5584
              },
5585
              "end": "(?<!,)(((?=[;=}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+)|^\\s*$))|((?<=\\S)(?=\\s*$)))",
5586
              "patterns": [
5587
                {
5588
                  "include": "#single-line-comment-consuming-line-ending"
5589
                },
5590
                {
5591
                  "include": "#comment"
5592
                },
5593
                {
5594
                  "include": "#var-single-const"
5595
                },
5596
                {
5597
                  "include": "#punctuation-comma"
5598
                }
5599
              ]
5600
            },
5601
            {
5602
              "include": "#punctuation-comma"
5603
            }
5604
          ]
5605
        }
5606
      ]
5607
    },
5608
    "var-single-const": {
5609
      "patterns": [
5610
        {
5611
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\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*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))",
5612
          "beginCaptures": {
5613
            "1": {
5614
              "name": "meta.definition.variable.ts variable.other.constant.ts entity.name.function.ts"
5615
            }
5616
          },
5617
          "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))",
5618
          "name": "meta.var-single-variable.expr.ts",
5619
          "patterns": [
5620
            {
5621
              "include": "#var-single-variable-type-annotation"
5622
            }
5623
          ]
5624
        },
5625
        {
5626
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)",
5627
          "beginCaptures": {
5628
            "1": {
5629
              "name": "meta.definition.variable.ts variable.other.constant.ts"
5630
            }
5631
          },
5632
          "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))",
5633
          "name": "meta.var-single-variable.expr.ts",
5634
          "patterns": [
5635
            {
5636
              "include": "#var-single-variable-type-annotation"
5637
            }
5638
          ]
5639
        }
5640
      ]
5641
    },
5642
    "var-single-variable": {
5643
      "patterns": [
5644
        {
5645
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)(!)?(?=\\s*(=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>)))))|(:\\s*((<)|(\\(\\s*((\\))|(\\.\\.\\.)|([$_[:alnum:]]+\\s*(([,:=?])|(\\)\\s*=>)))))))|(:\\s*(?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))Function(?![$_[:alnum:]])(?:(?=\\.\\.\\.)|(?!\\.)))|(:\\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*)))))))|(:\\s*(=>|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(<[^<>]*>)|[^(),<=>])+=\\s*(((async\\s+)?((function\\s*[(*<])|(function\\s+)|([$_[:alpha:]][$_[:alnum:]]*\\s*=>)))|((async\\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*))))))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*((\\)\\s*:)|((\\.\\.\\.\\s*)?[$_[:alpha:]][$_[:alnum:]]*\\s*:)))|((<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<]|<\\s*(((const\\s+)?[$_[:alpha:]])|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*]))([^<=>]|=[^<])*>)*>)*>\\s*)?\\(\\s*(/\\*([^*]|(\\*[^/]))*\\*/\\s*)*(([$_[:alpha:]]|(\\{([^{}]|(\\{([^{}]|\\{[^{}]*})*}))*})|(\\[([^]\\[]|(\\[([^]\\[]|\\[[^]\\[]*])*]))*])|(\\.\\.\\.\\s*[$_[:alpha:]]))([^\"'()`]|(\\(([^()]|(\\(([^()]|\\([^()]*\\))*\\)))*\\))|('([^'\\\\]|\\\\.)*')|(\"([^\"\\\\]|\\\\.)*\")|(`([^\\\\`]|\\\\.)*`))*)?\\)(\\s*:\\s*([^()<>{}]|<([^<>]|<([^<>]|<[^<>]+>)+>)+>|\\([^()]+\\)|\\{[^{}]+})+)?\\s*=>))))))",
5646
          "beginCaptures": {
5647
            "1": {
5648
              "name": "meta.definition.variable.ts entity.name.function.ts"
5649
            },
5650
            "2": {
5651
              "name": "keyword.operator.definiteassignment.ts"
5652
            }
5653
          },
5654
          "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))",
5655
          "name": "meta.var-single-variable.expr.ts",
5656
          "patterns": [
5657
            {
5658
              "include": "#var-single-variable-type-annotation"
5659
            }
5660
          ]
5661
        },
5662
        {
5663
          "begin": "(\\p{upper}[$_\\d[:upper:]]*)(?![$_[:alnum:]])(!)?",
5664
          "beginCaptures": {
5665
            "1": {
5666
              "name": "meta.definition.variable.ts variable.other.constant.ts"
5667
            },
5668
            "2": {
5669
              "name": "keyword.operator.definiteassignment.ts"
5670
            }
5671
          },
5672
          "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))",
5673
          "name": "meta.var-single-variable.expr.ts",
5674
          "patterns": [
5675
            {
5676
              "include": "#var-single-variable-type-annotation"
5677
            }
5678
          ]
5679
        },
5680
        {
5681
          "begin": "([$_[:alpha:]][$_[:alnum:]]*)(!)?",
5682
          "beginCaptures": {
5683
            "1": {
5684
              "name": "meta.definition.variable.ts variable.other.readwrite.ts"
5685
            },
5686
            "2": {
5687
              "name": "keyword.operator.definiteassignment.ts"
5688
            }
5689
          },
5690
          "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))",
5691
          "name": "meta.var-single-variable.expr.ts",
5692
          "patterns": [
5693
            {
5694
              "include": "#var-single-variable-type-annotation"
5695
            }
5696
          ]
5697
        }
5698
      ]
5699
    },
5700
    "var-single-variable-type-annotation": {
5701
      "patterns": [
5702
        {
5703
          "include": "#type-annotation"
5704
        },
5705
        {
5706
          "include": "#string"
5707
        },
5708
        {
5709
          "include": "#comment"
5710
        }
5711
      ]
5712
    },
5713
    "variable-initializer": {
5714
      "patterns": [
5715
        {
5716
          "begin": "(?<![!=])(=)(?!=)(?=\\s*\\S)(?!\\s*.*=>\\s*$)",
5717
          "beginCaptures": {
5718
            "1": {
5719
              "name": "keyword.operator.assignment.ts"
5720
            }
5721
          },
5722
          "end": "(?=$|^|[]),;}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))",
5723
          "patterns": [
5724
            {
5725
              "include": "#expression"
5726
            }
5727
          ]
5728
        },
5729
        {
5730
          "begin": "(?<![!=])(=)(?!=)",
5731
          "beginCaptures": {
5732
            "1": {
5733
              "name": "keyword.operator.assignment.ts"
5734
            }
5735
          },
5736
          "end": "(?=[]),;}]|((?<![$_[:alnum:]])(?:(?<=\\.\\.\\.)|(?<!\\.))(of|in)\\s+))|(?=^\\s*$)|(?<![-\\&*+/|])(?<=\\S)(?<!=)(?=\\s*$)",
5737
          "patterns": [
5738
            {
5739
              "include": "#expression"
5740
            }
5741
          ]
5742
        }
5743
      ]
5744
    }
5745
  },
5746
  "scopeName": "source.ts"
5747
}