3# http://www.sublimetext.com/docs/3/syntax.html
12 - match: \A(#!).*(?=$)
13 scope: comment.line.shebang.ts
15 1: punctuation.definition.comment.ts
19 0: punctuation.definition.comment.tsx
21 - meta_scope: comment.block.documentation.tsx
24 0: punctuation.definition.comment.tsx
27 - match: (/\*)(?:\s*((@)internal)(?=\s|(\*/)))?
29 1: punctuation.definition.comment.tsx
30 2: storage.type.internaldeclaration.tsx
31 3: punctuation.decorator.internaldeclaration.tsx
33 - meta_scope: comment.block.tsx
36 0: punctuation.definition.comment.tsx
38 - match: '(^[ \t]+)?((//)(?:\s*((@)internal)(?=\s|$))?)'
40 1: punctuation.whitespace.comment.leading.tsx
41 2: comment.line.double-slash.tsx
42 3: punctuation.definition.comment.tsx
43 4: storage.type.internaldeclaration.tsx
44 5: punctuation.decorator.internaldeclaration.tsx
46 - meta_content_scope: comment.line.double-slash.tsx
50 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
51 scope: storage.modifier.tsx
52 after-operator-block-as-object-literal:
53 - match: '(?<!\+\+|--)(?<=[:=(,\[?+!>]|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^yield|[^\._$[:alnum:]]yield|^throw|[^\._$[:alnum:]]throw|^in|[^\._$[:alnum:]]in|^of|[^\._$[:alnum:]]of|^typeof|[^\._$[:alnum:]]typeof|&&|\|\||\*)\s*(\{)'
55 1: punctuation.definition.block.tsx
57 - meta_scope: meta.objectliteral.tsx
60 0: punctuation.definition.block.tsx
62 - include: object-member
63 array-binding-pattern:
64 - match: '(?:(\.\.\.)\s*)?(\[)'
66 1: keyword.operator.rest.tsx
67 2: punctuation.definition.binding-pattern.array.tsx
71 0: punctuation.definition.binding-pattern.array.tsx
73 - include: binding-element
74 - include: punctuation-comma
75 array-binding-pattern-const:
76 - match: '(?:(\.\.\.)\s*)?(\[)'
78 1: keyword.operator.rest.tsx
79 2: punctuation.definition.binding-pattern.array.tsx
83 0: punctuation.definition.binding-pattern.array.tsx
85 - include: binding-element-const
86 - include: punctuation-comma
90 1: meta.brace.square.tsx
92 - meta_scope: meta.array.literal.tsx
95 0: meta.brace.square.tsx
98 - include: punctuation-comma
100 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(\basync)\s+)?([_$[:alpha:]][_$[:alnum:]]*)\s*(?==>)'
101 scope: meta.arrow.tsx
103 1: storage.modifier.async.tsx
104 2: variable.parameter.tsx
107 (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(\basync)
110 # sure shot arrow functions even if => is on new line
112 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
116 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
120 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
122 # arrow function possible to detect only with => on same line
124 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
125 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
126 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
127 \s*=> # arrow operator
132 1: storage.modifier.async.tsx
134 - meta_scope: meta.arrow.tsx
135 - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))'
138 - include: type-parameters
139 - include: function-parameters
140 - include: arrow-return-type
143 0: storage.type.function.arrow.tsx
145 - meta_scope: meta.arrow.tsx
146 - match: '(?<=\}|\S)(?<!=>)|((?!\{)(?=\S))'
148 - include: decl-block
149 - include: expression
151 - match: (?<=\))\s*(:)
153 1: keyword.operator.type.annotation.tsx
155 - meta_scope: meta.return.type.arrow.tsx
156 - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))'
158 - include: arrow-return-type-body
159 arrow-return-type-body:
160 - match: '(?<=[:])(?=\s*\{)'
164 - include: type-object
165 - include: type-predicate-operator
168 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(async)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
169 scope: storage.modifier.async.tsx
173 - include: object-binding-pattern
174 - include: array-binding-pattern
175 - include: destructuring-variable-rest
176 - include: variable-initializer
177 binding-element-const:
180 - include: object-binding-pattern-const
181 - include: array-binding-pattern-const
182 - include: destructuring-variable-rest-const
183 - include: variable-initializer
185 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))true(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
186 scope: constant.language.boolean.true.tsx
187 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))false(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
188 scope: constant.language.boolean.false.tsx
197 - match: '\]|(?=\*/)'
203 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])'
205 1: keyword.control.export.tsx
206 2: storage.modifier.tsx
207 3: storage.type.class.tsx
209 - meta_scope: meta.class.tsx
212 - include: class-declaration-or-expression-patterns
213 class-declaration-or-expression-patterns:
215 - include: class-or-interface-heritage
216 - match: "[_$[:alpha:]][_$[:alnum:]]*"
218 0: entity.name.type.class.tsx
219 - include: type-parameters
220 - include: class-or-interface-body
222 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(class)\b(?=\s+|[<{]|\/[\/*])'
224 1: storage.type.class.tsx
226 - meta_scope: meta.class.tsx
229 - include: class-declaration-or-expression-patterns
230 class-or-interface-body:
233 0: punctuation.definition.block.tsx
237 0: punctuation.definition.block.tsx
241 - include: method-declaration
242 - include: indexer-declaration
243 - include: field-declaration
245 - include: type-annotation
246 - include: variable-initializer
247 - include: access-modifier
248 - include: property-accessor
249 - include: async-modifier
250 - include: after-operator-block-as-object-literal
251 - include: decl-block
252 - include: expression
253 - include: punctuation-comma
254 - include: punctuation-semicolon
255 class-or-interface-heritage:
256 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(extends|implements)\b)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
258 1: storage.modifier.tsx
263 - include: class-or-interface-heritage
264 - include: type-parameters
265 - include: expressionWithoutIdentifiers
266 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))(?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)*\s*)'
268 1: entity.name.type.module.tsx
269 2: punctuation.accessor.tsx
270 3: punctuation.accessor.optional.tsx
271 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
273 1: entity.other.inherited-class.tsx
274 - include: expressionPunctuations
276 - include: switch-statement
278 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
279 scope: keyword.control.trycatch.tsx
280 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|goto)\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
282 1: keyword.control.loop.tsx
283 2: entity.name.label.tsx
284 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
285 scope: keyword.control.loop.tsx
286 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
287 scope: keyword.control.flow.tsx
288 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
289 scope: keyword.control.switch.tsx
290 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
291 scope: keyword.control.conditional.tsx
292 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
293 scope: keyword.control.with.tsx
294 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(package)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
295 scope: keyword.control.tsx
296 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
297 scope: keyword.other.debugger.tsx
298 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(declare)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
299 scope: storage.modifier.tsx
303 0: punctuation.definition.block.tsx
305 - meta_scope: meta.block.tsx
308 0: punctuation.definition.block.tsx
310 - include: statements
314 - include: function-declaration
315 - include: class-declaration
316 - include: interface-declaration
317 - include: enum-declaration
318 - include: namespace-declaration
319 - include: type-alias-declaration
320 - include: import-equals-declaration
321 - include: import-declaration
322 - include: export-declaration
324 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))\@'
326 0: punctuation.decorator.tsx
328 - meta_scope: meta.decorator.tsx
331 - include: expression
333 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
335 - meta_scope: meta.object-binding-pattern-variable.tsx
336 - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
338 - include: object-binding-pattern-const
339 - include: type-annotation
341 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
343 - meta_scope: meta.array-binding-pattern-variable.tsx
344 - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
346 - include: array-binding-pattern-const
347 - include: type-annotation
349 destructuring-parameter:
350 - match: '(?<!=|:)\s*(\{)'
352 1: punctuation.definition.binding-pattern.object.tsx
354 - meta_scope: meta.parameter.object-binding-pattern.tsx
357 0: punctuation.definition.binding-pattern.object.tsx
359 - include: parameter-object-binding-element
360 - match: '(?<!=|:)\s*(\[)'
362 1: punctuation.definition.binding-pattern.array.tsx
364 - meta_scope: meta.paramter.array-binding-pattern.tsx
367 0: punctuation.definition.binding-pattern.array.tsx
369 - include: parameter-binding-element
370 - include: punctuation-comma
371 destructuring-parameter-rest:
372 - match: '(?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*)'
374 1: keyword.operator.rest.tsx
375 2: variable.parameter.tsx
376 destructuring-variable:
377 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)'
379 - meta_scope: meta.object-binding-pattern-variable.tsx
380 - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
382 - include: object-binding-pattern
383 - include: type-annotation
385 - match: '(?<!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)'
387 - meta_scope: meta.array-binding-pattern-variable.tsx
388 - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
390 - include: array-binding-pattern
391 - include: type-annotation
393 destructuring-variable-rest:
394 - match: '(?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*)'
396 1: keyword.operator.rest.tsx
397 2: meta.definition.variable.tsx variable.other.readwrite.tsx
398 destructuring-variable-rest-const:
399 - match: '(?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*)'
401 1: keyword.operator.rest.tsx
402 2: meta.definition.variable.tsx variable.other.constant.tsx
404 - match: '^(///)\s*(?=<(reference|amd-dependency|amd-module)(\s+(path|types|no-default-lib|lib|name)\s*=\s*((\''([^\''\\]|\\\''|\\)*\'')|(\"([^\"\\]|\\\"|\\)*\")))+\s*/>\s*$)'
406 1: punctuation.definition.comment.tsx
408 - meta_scope: comment.line.triple-slash.directive.tsx
411 - match: (<)(reference|amd-dependency|amd-module)
413 1: punctuation.definition.tag.directive.tsx
414 2: entity.name.tag.directive.tsx
416 - meta_scope: meta.tag.tsx
419 0: punctuation.definition.tag.directive.tsx
421 - match: path|types|no-default-lib|lib|name
422 scope: entity.other.attribute-name.directive.tsx
424 scope: keyword.operator.assignment.tsx
431 (private|protected|public)
434 1: storage.type.class.jsdoc
435 2: punctuation.definition.block.tag.jsdoc
436 3: constant.language.access-type.jsdoc
452 1: storage.type.class.jsdoc
453 2: punctuation.definition.block.tag.jsdoc
454 3: entity.name.type.instance.jsdoc
455 4: punctuation.definition.bracket.angle.begin.jsdoc
456 5: constant.other.email.link.underline.jsdoc
457 6: punctuation.definition.bracket.angle.end.jsdoc
461 ((?:[^@\s*/]|\*[^/])+) # <that namepath>
463 ((?:[^@\s*/]|\*[^/])+) # <this namepath>
465 1: storage.type.class.jsdoc
466 2: punctuation.definition.block.tag.jsdoc
467 3: entity.name.type.instance.jsdoc
468 4: keyword.operator.control.jsdoc
469 5: entity.name.type.instance.jsdoc
470 - match: ((@)example)\s+
472 1: storage.type.class.jsdoc
473 2: punctuation.definition.block.tag.jsdoc
475 - meta_scope: meta.example.jsdoc
479 - match: \G(<)caption(>)
481 0: entity.name.tag.inline.jsdoc
482 1: punctuation.definition.bracket.angle.begin.jsdoc
483 2: punctuation.definition.bracket.angle.end.jsdoc
485 - meta_content_scope: constant.other.description.jsdoc
486 - match: (</)caption(>)|(?=\*/)
488 0: entity.name.tag.inline.jsdoc
489 1: punctuation.definition.bracket.angle.begin.jsdoc
490 2: punctuation.definition.bracket.angle.end.jsdoc
492 - match: '[^\s@*](?:[^*]|\*[^/])*'
494 0: source.embedded.tsx
495 - match: (?x) ((@)kind) \s+ (class|constant|event|external|file|function|member|mixin|module|namespace|typedef) \b
497 1: storage.type.class.jsdoc
498 2: punctuation.definition.block.tag.jsdoc
499 3: constant.language.symbol-type.jsdoc
514 # Avoid matching bare URIs (also acceptable as links)
517 # Avoid matching {@inline tags}; we match those below
518 (?:\[[^\[\]]*\])? # Possible description [preceding]{@tag}
519 {@(?:link|linkcode|linkplain|tutorial)\b
526 1: storage.type.class.jsdoc
527 2: punctuation.definition.block.tag.jsdoc
528 3: variable.other.link.underline.jsdoc
529 4: entity.name.type.instance.jsdoc
534 # One or more valid identifiers
536 [A-Za-z_$] # First character: non-numeric word character
537 [\w$.\[\]]* # Rest of identifier
538 (?: # Possible list of additional identifiers
545 1: storage.type.class.jsdoc
546 2: punctuation.definition.block.tag.jsdoc
547 3: variable.other.jsdoc
552 (?:arg|argument|const|constant|member|namespace|param|var)
560 1: storage.type.class.jsdoc
561 2: punctuation.definition.block.tag.jsdoc
562 3: variable.other.jsdoc
563 - match: '((@)typedef)\s+(?={)'
565 1: storage.type.class.jsdoc
566 2: punctuation.definition.block.tag.jsdoc
568 - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])'
571 - match: '(?:[^@\s*/]|\*[^/])+'
572 scope: entity.name.type.instance.jsdoc
573 - match: '((@)(?:arg|argument|const|constant|member|namespace|param|prop|property|var))\s+(?={)'
575 1: storage.type.class.jsdoc
576 2: punctuation.definition.block.tag.jsdoc
578 - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])'
581 - match: '([A-Za-z_$][\w$.\[\]]*)'
582 scope: variable.other.jsdoc
588 (?:\[\])? # Foo[ ].bar properties within an array
589 \. # Foo.Bar namespaced parameter
594 (=) # [foo=bar] Default parameter value
597 # The inner regexes are to stop the match early at */ and to not stop at escaped quotes
599 "(?:(?:\*(?!/))|(?:\\(?!"))|[^*\\])*?" | # [foo="bar"] Double-quoted
600 '(?:(?:\*(?!/))|(?:\\(?!'))|[^*\\])*?' | # [foo='bar'] Single-quoted
601 \[ (?:(?:\*(?!/))|[^*])*? \] | # [foo=[1,2]] Array literal
602 (?:(?:\*(?!/))|\s(?!\s*\])|\[.*?(?:\]|(?=\*/))|[^*\s\[\]])* # Everything else
606 \s*(?:(\])((?:[^*\s]|\*[^\s/])+)?|(?=\*/))
607 scope: variable.other.jsdoc
609 1: punctuation.definition.optional-value.begin.bracket.square.jsdoc
610 2: keyword.operator.assignment.jsdoc
611 3: source.embedded.tsx
612 4: punctuation.definition.optional-value.end.bracket.square.jsdoc
613 5: invalid.illegal.syntax.jsdoc
618 (?:define|enum|exception|export|extends|lends|implements|modifies
619 |namespace|private|protected|returns?|suppress|this|throws|type
624 1: storage.type.class.jsdoc
625 2: punctuation.definition.block.tag.jsdoc
627 - match: '(?=\s|\*/|[^{}\[\]A-Za-z_$])'
634 (?:alias|augments|callback|constructs|emits|event|fires|exports?
635 |extends|external|function|func|host|lends|listens|interface|memberof!?
636 |method|module|mixes|mixin|name|requires|see|this|typedef|uses)
645 1: storage.type.class.jsdoc
646 2: punctuation.definition.block.tag.jsdoc
647 3: entity.name.type.instance.jsdoc
648 - match: '((@)(?:default(?:value)?|license|version))\s+(([''''"]))'
650 1: storage.type.class.jsdoc
651 2: punctuation.definition.block.tag.jsdoc
652 3: variable.other.jsdoc
653 4: punctuation.definition.string.begin.jsdoc
655 - meta_content_scope: variable.other.jsdoc
656 - match: (\3)|(?=$|\*/)
658 0: variable.other.jsdoc
659 1: punctuation.definition.string.end.jsdoc
661 - match: '((@)(?:default(?:value)?|license|tutorial|variation|version))\s+([^\s*]+)'
663 1: storage.type.class.jsdoc
664 2: punctuation.definition.block.tag.jsdoc
665 3: variable.other.jsdoc
666 - match: '(?x) (@) (?:abstract|access|alias|api|arg|argument|async|attribute|augments|author|beta|borrows|bubbles |callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright |default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exception |exports?|extends|extension(?:_?for)?|external|externs|file|fileoverview|final|fires|for|func |function|generator|global|hideconstructor|host|ignore|implements|implicitCast|inherit[Dd]oc |inner|instance|interface|internal|kind|lends|license|listens|main|member|memberof!?|method |mixes|mixins?|modifies|module|name|namespace|noalias|nocollapse|nocompile|nosideeffects |override|overview|package|param|polymer(?:Behavior)?|preserve|private|prop|property|protected |public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary |suppress|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation |version|virtual|writeOnce|yields?) \b'
667 scope: storage.type.class.jsdoc
669 1: punctuation.definition.block.tag.jsdoc
670 - include: inline-tags
672 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)'
674 1: keyword.control.export.tsx
675 2: storage.modifier.tsx
676 3: storage.type.enum.tsx
677 4: entity.name.type.enum.tsx
679 - meta_scope: meta.enum.declaration.tsx
685 0: punctuation.definition.block.tsx
689 0: punctuation.definition.block.tsx
692 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
694 0: variable.other.enummember.tsx
696 - match: '(?=,|\}|$)'
699 - include: variable-initializer
700 - match: '(?=((\''([^\''\\]|\\\''|\\)*\'')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\])))'
702 - match: '(?=,|\}|$)'
705 - include: array-literal
707 - include: variable-initializer
708 - include: punctuation-comma
710 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)\s+(as)\s+(namespace)\s+([_$[:alpha:]][_$[:alnum:]]*)'
712 1: keyword.control.export.tsx
713 2: keyword.control.as.tsx
714 3: storage.type.namespace.tsx
715 4: entity.name.type.module.tsx
716 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))'
718 1: keyword.control.export.tsx
719 2: keyword.operator.assignment.tsx
720 3: keyword.control.default.tsx
722 - meta_scope: meta.export.default.tsx
723 - match: (?=$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)
725 - include: expression
726 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(export)(?!\s*:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
728 0: keyword.control.export.tsx
730 - meta_scope: meta.export.tsx
731 - match: (?=$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)
733 - include: import-export-declaration
735 - include: expressionWithoutIdentifiers
736 - include: identifiers
737 - include: expressionPunctuations
738 expression-inside-possibly-arrow-parens:
739 - include: expressionWithoutIdentifiers
740 - include: function-parameters-body
741 - include: identifiers
742 - include: expressionPunctuations
743 expression-operators:
744 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(await)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
745 scope: keyword.control.flow.tsx
746 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(yield)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?=\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*\*)'
748 1: keyword.control.flow.tsx
752 0: keyword.generator.asterisk.tsx
755 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(yield)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?:\s*(\*))?'
757 1: keyword.control.flow.tsx
758 2: keyword.generator.asterisk.tsx
759 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))delete(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
760 scope: keyword.operator.expression.delete.tsx
761 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))in(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?!\()'
762 scope: keyword.operator.expression.in.tsx
763 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))of(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))(?!\()'
764 scope: keyword.operator.expression.of.tsx
765 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))instanceof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
766 scope: keyword.operator.expression.instanceof.tsx
767 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
768 scope: keyword.operator.new.tsx
769 - include: typeof-operator
770 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))void(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
771 scope: keyword.operator.expression.void.tsx
772 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+'
774 1: keyword.control.as.tsx
776 - match: '(?=$|^|[;,:})\]]|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(as)\s+))'
780 scope: keyword.operator.spread.tsx
781 - match: \*=|(?<!\()/=|%=|\+=|\-=
782 scope: keyword.operator.assignment.compound.tsx
783 - match: \&=|\^=|<<=|>>=|>>>=|\|=
784 scope: keyword.operator.assignment.compound.bitwise.tsx
786 scope: keyword.operator.bitwise.shift.tsx
787 - match: "===|!==|==|!="
788 scope: keyword.operator.comparison.tsx
789 - match: <=|>=|<>|<|>
790 scope: keyword.operator.relational.tsx
792 scope: keyword.operator.logical.tsx
794 scope: keyword.operator.bitwise.tsx
796 scope: keyword.operator.assignment.tsx
798 scope: keyword.operator.decrement.tsx
800 scope: keyword.operator.increment.tsx
801 - match: '%|\*|/|-|\+'
802 scope: keyword.operator.arithmetic.tsx
803 - match: '(?<=[_$[:alnum:])\]])\s*(/)(?![/*])'
805 1: keyword.operator.arithmetic.tsx
806 expressionPunctuations:
807 - include: punctuation-comma
808 - include: punctuation-accessor
809 expressionWithoutIdentifiers:
815 - include: function-expression
816 - include: class-expression
817 - include: arrow-function
818 - include: paren-expression-possibly-arrow
820 - include: ternary-expression
822 - include: instanceof-expr
823 - include: object-literal
824 - include: expression-operators
825 - include: function-call
827 - include: support-objects
828 - include: paren-expression
831 (?x)(?<!\()(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s+)?(?=\s*((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
832 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
833 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
834 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
835 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
836 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
837 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
838 (?:\B(\.)[0-9][0-9_]*\b)| # .1
839 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
840 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))
842 1: storage.modifier.tsx
844 - meta_scope: meta.field.declaration.tsx
846 (?x)(?=\}|;|,|$|(^(?!\s*((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
847 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
848 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
849 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
850 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
851 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
852 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
853 (?:\B(\.)[0-9][0-9_]*\b)| # .1
854 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
855 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))))|(?<=\})
857 - include: variable-initializer
859 (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
860 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
861 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
862 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
863 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
864 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
865 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
866 (?:\B(\.)[0-9][0-9_]*\b)| # .1
867 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
868 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))
871 (?x)(?=[};,=]|$|(^(?!\s*((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
872 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
873 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
874 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
875 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
876 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
877 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
878 (?:\B(\.)[0-9][0-9_]*\b)| # .1
879 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
880 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\?\s*)?(=|:))))|(?<=\})
882 - include: type-annotation
884 - include: array-literal
885 - include: numeric-literal
888 (?x)([_$[:alpha:]][_$[:alnum:]]*)(\?)?(?=(\?\s*)?\s*
889 # function assignment |
894 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
897 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
898 # sure shot arrow functions even if => is on new line
900 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
904 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
908 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
910 # arrow function possible to detect only with => on same line
912 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
913 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
914 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
915 \s*=> # arrow operator
919 # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
931 (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
932 (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
936 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
939 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
940 # sure shot arrow functions even if => is on new line
942 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
946 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
950 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
952 # arrow function possible to detect only with => on same line
954 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
955 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
956 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
957 \s*=> # arrow operator
962 1: meta.definition.property.tsx entity.name.function.tsx
963 2: keyword.operator.optional.tsx
964 - match: "[_$[:alpha:]][_$[:alnum:]]*"
965 scope: meta.definition.property.tsx variable.object.property.tsx
967 scope: keyword.operator.optional.tsx
969 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))for(?=((\s+|(\s*\/\*([^\*]|(\*[^\/]))*\*\/\s*))await)?\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)?(\())'
971 0: keyword.control.loop.tsx
977 scope: keyword.control.loop.tsx
980 0: meta.brace.round.tsx
984 0: meta.brace.round.tsx
987 - include: expression
988 - include: punctuation-semicolon
991 - include: type-parameters
992 - include: function-parameters
993 - include: return-type
994 - include: decl-block
996 scope: keyword.generator.asterisk.tsx
998 - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1000 - match: '(?<=\))(?!(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*)\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1002 - match: '(?=(([_$[:alpha:]][_$[:alnum:]]*\s*\??\.\s*)*|(\??\.\s*)?)([_$[:alpha:]][_$[:alnum:]]*))'
1004 - meta_scope: meta.function-call.tsx
1005 - match: '(?=\s*(\?\.\s*)?(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)?\()'
1008 - include: support-objects
1009 - include: object-identifiers
1010 - include: punctuation-accessor
1011 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*[\(]\s*[\"\''\`]))'
1012 scope: keyword.operator.expression.import.tsx
1013 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1014 scope: entity.name.function.tsx
1017 scope: meta.function-call.tsx punctuation.accessor.optional.tsx
1018 - include: type-arguments
1019 - include: paren-expression
1020 function-declaration:
1021 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1023 1: keyword.control.export.tsx
1024 2: storage.modifier.async.tsx
1025 3: storage.type.function.tsx
1026 4: keyword.generator.asterisk.tsx
1027 5: meta.definition.function.tsx entity.name.function.tsx
1029 - meta_scope: meta.function.tsx
1030 - match: '(?=$|^|;)|(?<=\})'
1032 - include: function-name
1033 - include: function-body
1034 function-expression:
1035 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*'
1037 1: storage.modifier.async.tsx
1038 2: storage.type.function.tsx
1039 3: keyword.generator.asterisk.tsx
1040 4: meta.definition.function.tsx entity.name.function.tsx
1042 - meta_scope: meta.function.expression.tsx
1045 - include: function-name
1046 - include: function-body
1048 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1049 scope: meta.definition.function.tsx entity.name.function.tsx
1050 function-parameters:
1053 0: punctuation.definition.parameters.begin.tsx
1055 - meta_scope: meta.parameters.tsx
1058 0: punctuation.definition.parameters.end.tsx
1060 - include: function-parameters-body
1061 function-parameters-body:
1063 - include: decorator
1064 - include: destructuring-parameter
1065 - include: parameter-name
1066 - include: type-annotation
1067 - include: variable-initializer
1069 scope: punctuation.separator.parameter.tsx
1071 - include: object-identifiers
1073 (?x)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\s*=\s*(
1075 (function\s*[(<*]) |
1077 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1080 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1081 # sure shot arrow functions even if => is on new line
1083 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1087 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1091 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
1093 # arrow function possible to detect only with => on same line
1095 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1096 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1097 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1098 \s*=> # arrow operator
1103 1: punctuation.accessor.tsx
1104 2: punctuation.accessor.optional.tsx
1105 3: entity.name.function.tsx
1106 - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])'
1108 1: punctuation.accessor.tsx
1109 2: punctuation.accessor.optional.tsx
1110 3: variable.other.constant.property.tsx
1111 - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*([_$[:alpha:]][_$[:alnum:]]*)'
1113 1: punctuation.accessor.tsx
1114 2: punctuation.accessor.optional.tsx
1115 3: variable.other.property.tsx
1116 - match: "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
1117 scope: variable.other.constant.tsx
1118 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1119 scope: variable.other.readwrite.tsx
1121 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1123 1: keyword.control.export.tsx
1124 2: keyword.control.import.tsx
1126 - meta_scope: meta.import.tsx
1127 - match: '(?<!^import|[^\._$[:alnum:]]import)(?=;|$|^)'
1131 - match: '(?<=^import|[^\._$[:alnum:]]import)(?!\s*["''])'
1135 0: keyword.control.from.tsx
1137 - include: import-export-declaration
1138 - include: import-export-declaration
1139 import-equals-declaration:
1140 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()'
1142 1: keyword.control.export.tsx
1143 2: keyword.control.import.tsx
1144 3: variable.other.readwrite.alias.tsx
1145 4: keyword.operator.assignment.tsx
1146 5: keyword.control.require.tsx
1147 6: meta.brace.round.tsx
1149 - meta_scope: meta.import-equals.external.tsx
1152 0: meta.brace.round.tsx
1156 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)'
1158 1: keyword.control.export.tsx
1159 2: keyword.control.import.tsx
1160 3: variable.other.readwrite.alias.tsx
1161 4: keyword.operator.assignment.tsx
1163 - meta_scope: meta.import-equals.internal.tsx
1167 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
1169 1: entity.name.type.module.tsx
1170 2: punctuation.accessor.tsx
1171 3: punctuation.accessor.optional.tsx
1172 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1173 scope: variable.other.readwrite.tsx
1174 import-export-block:
1177 0: punctuation.definition.block.tsx
1179 - meta_scope: meta.block.tsx
1182 0: punctuation.definition.block.tsx
1184 - include: import-export-clause
1185 import-export-clause:
1187 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bdefault)|(\*)|(\b[_$[:alpha:]][_$[:alnum:]]*))\s+(as)\s+(?:(\bdefault(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(\b[_$[:alpha:]][_$[:alnum:]]*))'
1189 1: keyword.control.default.tsx
1190 2: constant.language.import-export-all.tsx
1191 3: variable.other.readwrite.tsx
1192 4: keyword.control.as.tsx
1193 5: keyword.control.default.tsx
1194 6: variable.other.readwrite.alias.tsx
1195 - include: punctuation-comma
1197 scope: constant.language.import-export-all.tsx
1198 - match: \b(default)\b
1199 scope: keyword.control.default.tsx
1200 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1201 scope: variable.other.readwrite.alias.tsx
1202 import-export-declaration:
1205 - include: import-export-block
1207 scope: keyword.control.from.tsx
1208 - include: import-export-clause
1209 indexer-declaration:
1210 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)'
1212 1: storage.modifier.tsx
1213 2: meta.brace.square.tsx
1214 3: variable.parameter.tsx
1216 - meta_scope: meta.indexer.declaration.tsx
1217 - match: '(\])\s*(\?\s*)?|$'
1219 1: meta.brace.square.tsx
1220 2: keyword.operator.optional.tsx
1222 - include: type-annotation
1223 indexer-mapped-type-declaration:
1224 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))([+-])?(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+'
1226 1: keyword.operator.type.modifier.tsx
1227 2: storage.modifier.tsx
1228 3: meta.brace.square.tsx
1229 4: entity.name.type.tsx
1230 5: keyword.operator.expression.in.tsx
1232 - meta_scope: meta.indexer.mappedtype.declaration.tsx
1233 - match: '(\])([+-])?\s*(\?\s*)?|$'
1235 1: meta.brace.square.tsx
1236 2: keyword.operator.type.modifier.tsx
1237 3: keyword.operator.optional.tsx
1241 - match: '(\[)[^\]]+(\])(?={@(?:link|linkcode|linkplain|tutorial))'
1242 scope: constant.other.description.jsdoc
1244 1: punctuation.definition.bracket.square.begin.jsdoc
1245 2: punctuation.definition.bracket.square.end.jsdoc
1246 - match: '({)((@)(?:link(?:code|plain)?|tutorial))\s*'
1248 1: punctuation.definition.bracket.curly.begin.jsdoc
1249 2: storage.type.class.jsdoc
1250 3: punctuation.definition.inline.tag.jsdoc
1252 - meta_scope: entity.name.type.instance.jsdoc
1253 - match: '}|(?=\*/)'
1255 0: punctuation.definition.bracket.curly.end.jsdoc
1257 - match: '\G((?=https?://)(?:[^|}\s*]|\*[/])+)(\|)?'
1259 1: variable.other.link.underline.jsdoc
1260 2: punctuation.separator.pipe.jsdoc
1261 - match: '\G((?:[^{}@\s|*]|\*[^/])+)(\|)?'
1263 1: variable.other.description.jsdoc
1264 2: punctuation.separator.pipe.jsdoc
1266 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(instanceof)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1268 1: keyword.operator.expression.instanceof.tsx
1270 - match: '(?<=\))|(?=[;),}\]:?]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1273 interface-declaration:
1274 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(export)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])'
1276 1: keyword.control.export.tsx
1277 2: storage.modifier.tsx
1278 3: storage.type.interface.tsx
1280 - meta_scope: meta.interface.tsx
1284 - include: class-or-interface-heritage
1285 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1287 0: entity.name.type.interface.tsx
1288 - include: type-parameters
1289 - include: class-or-interface-body
1291 - match: '\G{(?:[^}*]|\*[^/}])+$'
1292 scope: invalid.illegal.type.jsdoc
1295 0: entity.name.type.instance.jsdoc
1296 1: punctuation.definition.bracket.curly.begin.jsdoc
1298 - meta_content_scope: entity.name.type.instance.jsdoc
1299 - match: '((}))\s*|(?=\*/)'
1301 1: entity.name.type.instance.jsdoc
1302 2: punctuation.definition.bracket.curly.end.jsdoc
1306 - include: jsx-tag-without-attributes-in-expression
1307 - include: jsx-tag-in-expression
1309 - include: jsx-tag-without-attributes
1311 - include: jsx-evaluated-code
1312 - include: jsx-entities
1314 - match: "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)"
1315 scope: constant.character.entity.tsx
1317 1: punctuation.definition.entity.tsx
1318 3: punctuation.definition.entity.tsx
1320 scope: invalid.illegal.bad-ampersand.tsx
1324 0: punctuation.section.embedded.begin.tsx
1326 - meta_scope: meta.embedded.expression.tsx
1329 0: punctuation.section.embedded.end.tsx
1331 - include: expression
1332 jsx-string-double-quoted:
1335 0: punctuation.definition.string.begin.tsx
1337 - meta_scope: string.quoted.double.tsx
1340 0: punctuation.definition.string.end.tsx
1342 - include: jsx-entities
1343 jsx-string-single-quoted:
1346 0: punctuation.definition.string.begin.tsx
1348 - meta_scope: string.quoted.single.tsx
1351 0: punctuation.definition.string.end.tsx
1353 - include: jsx-entities
1355 - match: '(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1357 - meta_scope: meta.tag.tsx
1358 - match: '(/>)|(?:(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1360 1: punctuation.definition.tag.end.tsx
1361 2: punctuation.definition.tag.begin.tsx
1362 3: entity.name.tag.namespace.tsx
1363 4: punctuation.separator.namespace.tsx
1364 5: entity.name.tag.tsx
1365 6: support.class.component.tsx
1366 7: punctuation.definition.tag.end.tsx
1368 - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>)'
1370 1: punctuation.definition.tag.begin.tsx
1371 2: entity.name.tag.namespace.tsx
1372 3: punctuation.separator.namespace.tsx
1373 4: entity.name.tag.tsx
1374 5: support.class.component.tsx
1376 - match: "(?=[/]?>)"
1379 - include: type-arguments
1380 - include: jsx-tag-attributes
1383 1: punctuation.definition.tag.end.tsx
1385 - meta_content_scope: meta.jsx.children.tsx
1388 - include: jsx-children
1389 jsx-tag-attribute-assignment:
1390 - match: '=(?=\s*(?:''|"|{|/\*|//|\n))'
1391 scope: keyword.operator.assignment.tsx
1392 jsx-tag-attribute-name:
1396 (?:([_$[:alpha:]][-$[:alnum:].]*)(:))?
1397 ([_$[:alpha:]][-$[:alnum:]]*)
1400 1: entity.other.attribute-name.namespace.tsx
1401 2: punctuation.separator.namespace.tsx
1402 3: entity.other.attribute-name.tsx
1406 - meta_scope: meta.tag.attributes.tsx
1407 - match: "(?=[/]?>)"
1410 - include: jsx-tag-attribute-name
1411 - include: jsx-tag-attribute-assignment
1412 - include: jsx-string-double-quoted
1413 - include: jsx-string-single-quoted
1414 - include: jsx-evaluated-code
1415 - include: jsx-tag-attributes-illegal
1416 jsx-tag-attributes-illegal:
1418 scope: invalid.illegal.attribute.tsx
1419 jsx-tag-in-expression:
1422 (?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*
1423 (?!<\s*[_$[:alpha:]][_$[:alnum:]]*((\s+extends\s+[^=>])|,)) # look ahead is not type parameter of arrow
1424 (?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))
1426 - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))(?=((<\s*)|(\s+))(?!\?)|\/?>))'
1429 jsx-tag-without-attributes:
1430 - match: '(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1432 1: punctuation.definition.tag.begin.tsx
1433 2: entity.name.tag.namespace.tsx
1434 3: punctuation.separator.namespace.tsx
1435 4: entity.name.tag.tsx
1436 5: support.class.component.tsx
1437 6: punctuation.definition.tag.end.tsx
1439 - meta_scope: meta.tag.without-attributes.tsx
1440 - meta_content_scope: meta.jsx.children.tsx
1441 - match: '(</)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>)'
1443 1: punctuation.definition.tag.begin.tsx
1444 2: entity.name.tag.namespace.tsx
1445 3: punctuation.separator.namespace.tsx
1446 4: entity.name.tag.tsx
1447 5: support.class.component.tsx
1448 6: punctuation.definition.tag.end.tsx
1450 - include: jsx-children
1451 jsx-tag-without-attributes-in-expression:
1452 - match: '(?<!\+\+|--)(?<=[({\[,?=>:*]|&&|\|\||\?|^await|[^\._$[:alnum:]]await|^return|[^\._$[:alnum:]]return|^default|[^\._$[:alnum:]]default|^yield|[^\._$[:alnum:]]yield|^)\s*(?=(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1454 - match: '(?!(<)\s*(?:([_$[:alpha:]][-$[:alnum:].]*)(?<!\.|-)(:))?((?:[a-z][a-z0-9]*|([_$[:alpha:]][-$[:alnum:].]*))(?<!\.|-))?\s*(>))'
1456 - include: jsx-tag-without-attributes
1458 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*\{)'
1460 1: entity.name.label.tsx
1461 2: punctuation.separator.label.tsx
1465 - include: decl-block
1466 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(:)'
1468 1: entity.name.label.tsx
1469 2: punctuation.separator.label.tsx
1471 - include: numeric-literal
1472 - include: boolean-literal
1473 - include: null-literal
1474 - include: undefined-literal
1475 - include: numericConstant-literal
1476 - include: array-literal
1477 - include: this-literal
1478 - include: super-literal
1480 - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1482 1: storage.modifier.tsx
1483 2: storage.modifier.tsx
1484 3: storage.modifier.async.tsx
1487 - meta_scope: meta.method.declaration.tsx
1488 - match: '(?=\}|;|,|$)|(?<=\})'
1490 - include: method-declaration-name
1491 - include: function-body
1492 - match: '(?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*[\(\<])'
1494 1: storage.modifier.tsx
1495 2: storage.modifier.tsx
1496 3: storage.modifier.async.tsx
1497 4: keyword.operator.new.tsx
1498 5: keyword.generator.asterisk.tsx
1500 - meta_scope: meta.method.declaration.tsx
1501 - match: '(?=\}|;|,|$)|(?<=\})'
1503 - include: method-declaration-name
1504 - include: function-body
1506 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1507 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1508 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1509 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1510 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1511 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1512 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1513 (?:\B(\.)[0-9][0-9_]*\b)| # .1
1514 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1515 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1517 1: storage.modifier.tsx
1518 2: storage.modifier.tsx
1519 3: storage.modifier.async.tsx
1520 4: storage.type.property.tsx
1521 5: keyword.generator.asterisk.tsx
1523 - meta_scope: meta.method.declaration.tsx
1524 - match: '(?=\}|;|,|$)|(?<=\})'
1526 - include: method-declaration-name
1527 - include: function-body
1528 method-declaration-name:
1530 (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1531 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1532 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1533 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1534 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1535 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1536 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1537 (?:\B(\.)[0-9][0-9_]*\b)| # .1
1538 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1539 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\<])
1544 - include: array-literal
1545 - include: numeric-literal
1546 - match: "[_$[:alpha:]][_$[:alnum:]]*"
1547 scope: meta.definition.method.tsx entity.name.function.tsx
1549 scope: keyword.operator.optional.tsx
1550 namespace-declaration:
1551 - match: '(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"''`]))'
1553 1: keyword.control.export.tsx
1554 2: storage.type.namespace.tsx
1556 - meta_scope: meta.namespace.declaration.tsx
1557 - match: '(?<=\})|(?=;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)'
1561 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1562 scope: entity.name.type.module.tsx
1563 - include: punctuation-accessor
1564 - include: decl-block
1566 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1568 1: keyword.operator.new.tsx
1570 - meta_scope: new.expr.tsx
1571 - match: '(?<=\))|(?=[;),}\]:]|\|\||\&\&|$|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))new(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|((?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))function((\s+[_$[:alpha:]][_$[:alnum:]]*)|(\s*[\(]))))'
1573 - include: paren-expression
1574 - include: class-declaration
1577 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))null(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1578 scope: constant.language.null.tsx
1580 - match: '\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$)'
1581 scope: constant.numeric.hex.tsx
1582 - match: '\b(?<!\$)0(b|B)[01][01_]*\b(?!\$)'
1583 scope: constant.numeric.binary.tsx
1584 - match: '\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$)'
1585 scope: constant.numeric.octal.tsx
1589 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1590 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1591 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1592 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1593 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1594 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1595 (?:\B(\.)[0-9][0-9_]*\b)| # .1
1596 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1599 0: constant.numeric.decimal.tsx
1600 1: meta.delimiter.decimal.period.tsx
1601 2: meta.delimiter.decimal.period.tsx
1602 3: meta.delimiter.decimal.period.tsx
1603 4: meta.delimiter.decimal.period.tsx
1604 5: meta.delimiter.decimal.period.tsx
1605 6: meta.delimiter.decimal.period.tsx
1606 numericConstant-literal:
1607 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))NaN(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1608 scope: constant.language.nan.tsx
1609 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))Infinity(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
1610 scope: constant.language.infinity.tsx
1611 object-binding-element:
1614 (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1615 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1616 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1617 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1618 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1619 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1620 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1621 (?:\B(\.)[0-9][0-9_]*\b)| # .1
1622 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1623 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1627 - include: object-binding-element-propertyName
1628 - include: binding-element
1629 - include: object-binding-pattern
1630 - include: destructuring-variable-rest
1631 - include: variable-initializer
1632 - include: punctuation-comma
1633 object-binding-element-const:
1636 (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1637 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1638 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1639 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1640 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1641 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1642 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1643 (?:\B(\.)[0-9][0-9_]*\b)| # .1
1644 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1645 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1649 - include: object-binding-element-propertyName
1650 - include: binding-element-const
1651 - include: object-binding-pattern-const
1652 - include: destructuring-variable-rest-const
1653 - include: variable-initializer
1654 - include: punctuation-comma
1655 object-binding-element-propertyName:
1657 (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1658 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1659 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1660 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1661 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1662 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1663 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1664 (?:\B(\.)[0-9][0-9_]*\b)| # .1
1665 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1666 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
1670 0: punctuation.destructuring.tsx
1673 - include: array-literal
1674 - include: numeric-literal
1675 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
1676 scope: variable.object.property.tsx
1677 object-binding-pattern:
1678 - match: '(?:(\.\.\.)\s*)?(\{)'
1680 1: keyword.operator.rest.tsx
1681 2: punctuation.definition.binding-pattern.object.tsx
1685 0: punctuation.definition.binding-pattern.object.tsx
1687 - include: object-binding-element
1688 object-binding-pattern-const:
1689 - match: '(?:(\.\.\.)\s*)?(\{)'
1691 1: keyword.operator.rest.tsx
1692 2: punctuation.definition.binding-pattern.object.tsx
1696 0: punctuation.definition.binding-pattern.object.tsx
1698 - include: object-binding-element-const
1700 - match: '([_$[:alpha:]][_$[:alnum:]]*)(?=\s*\??\.\s*prototype\b(?!\$))'
1701 scope: support.class.tsx
1703 (?x)(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
1704 ([[:upper:]][_$[:digit:][:upper:]]*) |
1705 ([_$[:alpha:]][_$[:alnum:]]*)
1706 )(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
1708 1: punctuation.accessor.tsx
1709 2: punctuation.accessor.optional.tsx
1710 3: variable.other.constant.object.property.tsx
1711 4: variable.other.object.property.tsx
1714 ([[:upper:]][_$[:digit:][:upper:]]*) |
1715 ([_$[:alpha:]][_$[:alnum:]]*)
1716 )(?=\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)
1718 1: variable.other.constant.object.tsx
1719 2: variable.other.object.tsx
1723 0: punctuation.definition.block.tsx
1725 - meta_scope: meta.objectliteral.tsx
1728 0: punctuation.definition.block.tsx
1730 - include: object-member
1731 object-literal-method-declaration:
1733 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1734 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1735 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1736 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1737 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1738 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1739 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1740 (?:\B(\.)[0-9][0-9_]*\b)| # .1
1741 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1742 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1744 1: storage.modifier.async.tsx
1745 2: storage.type.property.tsx
1746 3: keyword.generator.asterisk.tsx
1748 - meta_scope: meta.method.declaration.tsx
1749 - match: '(?=\}|;|,)|(?<=\})'
1751 - include: method-declaration-name
1752 - include: function-body
1754 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
1755 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
1756 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
1757 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
1758 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
1759 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
1760 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
1761 (?:\B(\.)[0-9][0-9_]*\b)| # .1
1762 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
1763 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\<])
1765 1: storage.modifier.async.tsx
1766 2: storage.type.property.tsx
1767 3: keyword.generator.asterisk.tsx
1771 - include: method-declaration-name
1774 - include: object-literal-method-declaration
1777 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1778 - match: '(?=:)|((?<=[\]])(?=\s*[\(\<]))'
1780 - include: array-literal
1781 - match: '(?=[\''\"])'
1783 - meta_scope: meta.object.member.tsx meta.object-literal.key.tsx
1784 - match: '(?=:)|((?<=[\''\"])(?=\s*[\(\<]))'
1787 - match: '(?<=[\]\''\"])(?=\s*[\(\<])'
1789 - meta_scope: meta.method.declaration.tsx
1790 - match: '(?=\}|;|,)|(?<=\})'
1792 - include: function-body
1793 - match: '(?![_$[:alpha:]])([[:digit:]]+)\s*(?=:)'
1794 scope: meta.object.member.tsx
1796 0: meta.object-literal.key.tsx
1797 1: constant.numeric.decimal.tsx
1799 (?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:\s*(
1801 (function\s*[(<*]) |
1803 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1806 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1807 # sure shot arrow functions even if => is on new line
1809 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1813 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1817 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
1819 # arrow function possible to detect only with => on same line
1821 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1822 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1823 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1824 \s*=> # arrow operator
1828 scope: meta.object.member.tsx
1830 0: meta.object-literal.key.tsx
1831 1: entity.name.function.tsx
1832 - match: '(?:[_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)'
1833 scope: meta.object.member.tsx
1835 0: meta.object-literal.key.tsx
1838 0: keyword.operator.spread.tsx
1840 - meta_scope: meta.object.member.tsx
1843 - include: expression
1844 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=,|\}|$)'
1845 scope: meta.object.member.tsx
1847 1: variable.other.readwrite.tsx
1848 - match: '(?=[_$[:alpha:]][_$[:alnum:]]*\s*=)'
1850 - meta_scope: meta.object.member.tsx
1851 - match: '(?=,|\}|$)'
1853 - include: expression
1856 0: meta.object-literal.key.tsx punctuation.separator.key-value.tsx
1858 - meta_scope: meta.object.member.tsx
1861 - match: '(?<=:)\s*(async)?(?=\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)\(\s*([\{\[]\s*)?$)'
1863 1: storage.modifier.async.tsx
1867 - include: type-parameters
1870 0: meta.brace.round.tsx
1874 0: meta.brace.round.tsx
1876 - include: expression-inside-possibly-arrow-parens
1877 - match: '(?<=:)\s*(async)?\s*(\()(?=\s*([\{\[]\s*)?$)'
1879 1: storage.modifier.async.tsx
1880 2: meta.brace.round.tsx
1884 0: meta.brace.round.tsx
1886 - include: expression-inside-possibly-arrow-parens
1887 - include: expression
1888 - include: punctuation-comma
1889 parameter-array-binding-pattern:
1890 - match: '(?:(\.\.\.)\s*)?(\[)'
1892 1: keyword.operator.rest.tsx
1893 2: punctuation.definition.binding-pattern.array.tsx
1897 0: punctuation.definition.binding-pattern.array.tsx
1899 - include: parameter-binding-element
1900 - include: punctuation-comma
1901 parameter-binding-element:
1904 - include: parameter-object-binding-pattern
1905 - include: parameter-array-binding-pattern
1906 - include: destructuring-parameter-rest
1907 - include: variable-initializer
1909 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|protected|private|readonly)\s+(?=(public|protected|private|readonly)\s+)'
1911 1: storage.modifier.tsx
1913 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
1914 # function assignment |
1917 (function\s*[(<*]) |
1919 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1922 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1923 # sure shot arrow functions even if => is on new line
1925 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1929 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1933 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
1935 # arrow function possible to detect only with => on same line
1937 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1938 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1939 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1940 \s*=> # arrow operator
1944 # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
1956 (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
1957 (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
1959 (function\s*[(<*]) |
1961 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
1964 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
1965 # sure shot arrow functions even if => is on new line
1967 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
1971 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
1975 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
1977 # arrow function possible to detect only with => on same line
1979 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
1980 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
1981 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
1982 \s*=> # arrow operator
1987 1: storage.modifier.tsx
1988 2: keyword.operator.rest.tsx
1989 3: entity.name.function.tsx variable.language.this.tsx
1990 4: entity.name.function.tsx
1991 5: keyword.operator.optional.tsx
1992 - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)'
1994 1: storage.modifier.tsx
1995 2: keyword.operator.rest.tsx
1996 3: variable.parameter.tsx variable.language.this.tsx
1997 4: variable.parameter.tsx
1998 5: keyword.operator.optional.tsx
1999 parameter-object-binding-element:
2002 (?x)(?=((\b(?<!\$)0(x|X)[0-9a-fA-F][0-9a-fA-F_]*\b(?!\$))|(\b(?<!\$)0(b|B)[01][01_]*\b(?!\$))|(\b(?<!\$)0(o|O)?[0-7][0-7_]*\b(?!\$))|((?<!\$)(?:
2003 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1.1E+3
2004 (?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*\b)| # 1.E+3
2005 (?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # .1E+3
2006 (?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*\b)| # 1E+3
2007 (?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*\b)| # 1.1
2008 (?:\b[0-9][0-9_]*(\.)\B)| # 1.
2009 (?:\B(\.)[0-9][0-9_]*\b)| # .1
2010 (?:\b[0-9][0-9_]*\b(?!\.)) # 1
2011 )(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))
2015 - include: object-binding-element-propertyName
2016 - include: parameter-binding-element
2017 - include: parameter-object-binding-pattern
2018 - include: destructuring-parameter-rest
2019 - include: variable-initializer
2020 - include: punctuation-comma
2021 parameter-object-binding-pattern:
2022 - match: '(?:(\.\.\.)\s*)?(\{)'
2024 1: keyword.operator.rest.tsx
2025 2: punctuation.definition.binding-pattern.object.tsx
2029 0: punctuation.definition.binding-pattern.object.tsx
2031 - include: parameter-object-binding-element
2035 0: meta.brace.round.tsx
2039 0: meta.brace.round.tsx
2041 - include: expression
2042 paren-expression-possibly-arrow:
2043 - match: '(?<=[(=,])\s*(async)?(?=\s*((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\(\s*[\{\[]\s*$)'
2045 1: storage.modifier.async.tsx
2049 - include: paren-expression-possibly-arrow-with-typeparameters
2050 - match: '(?<=[(=,]|=>)\s*(async)?(?=\s*((((<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*))?\()|(<))\s*$)'
2052 1: storage.modifier.async.tsx
2056 - include: paren-expression-possibly-arrow-with-typeparameters
2057 - include: possibly-arrow-return-type
2058 paren-expression-possibly-arrow-with-typeparameters:
2059 - include: type-parameters
2062 0: meta.brace.round.tsx
2066 0: meta.brace.round.tsx
2068 - include: expression-inside-possibly-arrow-parens
2069 possibly-arrow-return-type:
2070 - match: '(?<=\))\s*(:)(?=\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+\s*=>)'
2072 1: meta.arrow.tsx meta.return.type.arrow.tsx keyword.operator.type.annotation.tsx
2074 - meta_content_scope: meta.arrow.tsx meta.return.type.arrow.tsx
2075 - match: '(?==>|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))'
2077 - include: arrow-return-type-body
2079 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(get|set)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2080 scope: storage.type.property.tsx
2081 punctuation-accessor:
2082 - match: '(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
2084 1: punctuation.accessor.tsx
2085 2: punctuation.accessor.optional.tsx
2088 scope: punctuation.separator.comma.tsx
2089 punctuation-semicolon:
2091 scope: punctuation.terminator.statement.tsx
2095 0: punctuation.definition.string.begin.tsx
2097 - meta_scope: string.quoted.double.tsx
2098 - match: '(")|((?:[^\\\n])$)'
2100 1: punctuation.definition.string.end.tsx
2101 2: invalid.illegal.newline.tsx
2103 - include: string-character-escape
2107 0: punctuation.definition.string.begin.tsx
2109 - meta_scope: string.quoted.single.tsx
2110 - match: '(\'')|((?:[^\\\n])$)'
2112 1: punctuation.definition.string.end.tsx
2113 2: invalid.illegal.newline.tsx
2115 - include: string-character-escape
2117 - match: '(?<!\+\+|--|})(?<=[=(:,\[?+!]|^return|[^\._$[:alnum:]]return|^case|[^\._$[:alnum:]]case|=>|&&|\|\||\*\/)\s*(\/)(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
2119 1: punctuation.definition.string.begin.tsx
2121 - meta_scope: string.regexp.tsx
2122 - match: "(/)([gimsuy]*)"
2124 1: punctuation.definition.string.end.tsx
2125 2: keyword.other.tsx
2128 - match: '(?<![_$[:alnum:])\]]|\+\+|--|})\/(?![\/*])(?=(?:[^\/\\\[]|\\.|\[([^\]\\]|\\.)+\])+\/[gimsuy]*(?!\s*[a-zA-Z0-9_$]))'
2130 0: punctuation.definition.string.begin.tsx
2132 - meta_scope: string.regexp.tsx
2133 - match: "(/)([gimsuy]*)"
2135 1: punctuation.definition.string.end.tsx
2136 2: keyword.other.tsx
2139 regex-character-class:
2140 - match: '\\[wWsSdDtrnvf]|\.'
2141 scope: constant.other.character-class.regexp
2142 - match: '\\([0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4})'
2143 scope: constant.character.numeric.regexp
2145 scope: constant.character.control.regexp
2147 scope: constant.character.escape.backslash.regexp
2149 - match: '\\[bB]|\^|\$'
2150 scope: keyword.control.anchor.regexp
2151 - match: '\\[1-9]\d*|\\k<([a-zA-Z_$][\w$]*)>'
2153 0: keyword.other.back-reference.regexp
2154 1: variable.other.regexp
2155 - match: '[?+*]|\{(\d+,\d+|\d+,|,\d+|\d+)\}\??'
2156 scope: keyword.operator.quantifier.regexp
2158 scope: keyword.operator.or.regexp
2159 - match: (\()((\?=)|(\?!)|(\?<=)|(\?<!))
2161 1: punctuation.definition.group.regexp
2162 2: punctuation.definition.group.assertion.regexp
2163 3: meta.assertion.look-ahead.regexp
2164 4: meta.assertion.negative-look-ahead.regexp
2165 5: meta.assertion.look-behind.regexp
2166 6: meta.assertion.negative-look-behind.regexp
2168 - meta_scope: meta.group.assertion.regexp
2171 1: punctuation.definition.group.regexp
2174 - match: '\((?:(\?:)|(?:\?<([a-zA-Z_$][\w$]*)>))?'
2176 0: punctuation.definition.group.regexp
2177 1: punctuation.definition.group.no-capture.regexp
2178 2: variable.other.regexp
2180 - meta_scope: meta.group.regexp
2183 0: punctuation.definition.group.regexp
2186 - match: '(\[)(\^)?'
2188 1: punctuation.definition.character-class.regexp
2189 2: keyword.operator.negation.regexp
2191 - meta_scope: constant.other.character-class.set.regexp
2194 1: punctuation.definition.character-class.regexp
2196 - match: '(?:.|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))\-(?:[^\]\\]|(\\(?:[0-7]{3}|x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4}))|(\\c[A-Z])|(\\.))'
2197 scope: constant.other.character-class.range.regexp
2199 1: constant.character.numeric.regexp
2200 2: constant.character.control.regexp
2201 3: constant.character.escape.backslash.regexp
2202 4: constant.character.numeric.regexp
2203 5: constant.character.control.regexp
2204 6: constant.character.escape.backslash.regexp
2205 - include: regex-character-class
2206 - include: regex-character-class
2208 - match: (?<=\))\s*(:)(?=\s*\S)
2210 1: keyword.operator.type.annotation.tsx
2212 - meta_scope: meta.return.type.tsx
2213 - match: "(?<![:|&])(?=$|^|[{};,]|//)"
2215 - include: return-type-core
2216 - match: (?<=\))\s*(:)
2218 1: keyword.operator.type.annotation.tsx
2220 - meta_scope: meta.return.type.tsx
2221 - match: '(?<![:|&])((?=[{};,]|//|^\s*$)|((?<=\S)(?=\s*$)))'
2223 - include: return-type-core
2226 - match: '(?<=[:|&])(?=\s*\{)'
2230 - include: type-object
2231 - include: type-predicate-operator
2237 - include: declaration
2238 - include: control-statement
2239 - include: after-operator-block-as-object-literal
2240 - include: decl-block
2242 - include: expression
2243 - include: punctuation-semicolon
2245 - include: qstring-single
2246 - include: qstring-double
2247 string-character-escape:
2248 - match: '\\(x[0-9A-Fa-f]{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)'
2249 scope: constant.character.escape.tsx
2251 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))super\b(?!\$)'
2252 scope: variable.language.super.tsx
2254 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(arguments)\b(?!\$)'
2255 scope: variable.language.arguments.tsx
2257 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator
2258 |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Proxy
2259 |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray
2260 |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\b(?!\$)
2261 scope: support.class.builtin.tsx
2262 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\b(?!\$)'
2263 scope: support.class.error.tsx
2264 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Promise)\b(?!\$)'
2265 scope: support.class.promise.tsx
2267 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval|
2268 isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\s*\()
2269 scope: support.function.tsx
2271 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Math)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(?:
2272 (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|
2273 expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|
2274 round|sign|sin|sinh|sqrt|tan|tanh|trunc)
2276 (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\b(?!\$)
2278 1: support.constant.math.tsx
2279 2: punctuation.accessor.tsx
2280 3: punctuation.accessor.optional.tsx
2281 4: support.function.math.tsx
2282 5: support.constant.property.math.tsx
2284 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(console)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(
2285 assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log
2286 |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\b(?!\$)
2288 1: support.class.console.tsx
2289 2: punctuation.accessor.tsx
2290 3: punctuation.accessor.optional.tsx
2291 4: support.function.console.tsx
2292 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(JSON)(?:\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(parse|stringify))?\b(?!\$)'
2294 1: support.constant.json.tsx
2295 2: punctuation.accessor.tsx
2296 3: punctuation.accessor.optional.tsx
2297 4: support.function.json.tsx
2298 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(import)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(meta)\b(?!\$)'
2300 1: keyword.control.import.tsx
2301 2: punctuation.accessor.tsx
2302 3: punctuation.accessor.optional.tsx
2303 4: support.variable.property.importmeta.tsx
2304 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))\s*(target)\b(?!\$)'
2306 1: keyword.operator.new.tsx
2307 2: punctuation.accessor.tsx
2308 3: punctuation.accessor.optional.tsx
2309 4: support.variable.property.target.tsx
2311 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2312 (constructor|length|prototype|__proto__)
2314 (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\b(?!\$)
2316 1: punctuation.accessor.tsx
2317 2: punctuation.accessor.optional.tsx
2318 3: support.variable.property.tsx
2319 4: support.constant.tsx
2321 (?x) (?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.)) \b (?:
2322 (document|event|navigator|performance|screen|window)
2324 (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener
2325 |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule
2326 |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration
2327 |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern
2328 |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent
2329 |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException
2330 |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer
2331 |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry
2332 |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent
2333 |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential
2334 |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync
2335 |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement
2336 |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement
2337 |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement
2338 |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement
2339 |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement
2340 |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement
2341 |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement
2342 |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement
2343 |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement
2344 |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement
2345 |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement
2346 |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase
2347 |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction
2348 |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities
2349 |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess
2350 |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent
2351 |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream
2352 |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent
2353 |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID
2354 |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification
2355 |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential
2356 |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark
2357 |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList
2358 |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent
2359 |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList
2360 |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager
2361 |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource
2362 |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement
2363 |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength
2364 |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio
2365 |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement
2366 |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement
2367 |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement
2368 |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength
2369 |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement
2370 |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio
2371 |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList
2372 |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement
2373 |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement
2374 |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState
2375 |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet
2376 |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable
2377 |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer
2378 |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat
2379 |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES
2380 |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope
2381 |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult
2382 |XSLTProcessor))\b(?!\$)
2384 1: support.variable.dom.tsx
2385 2: support.class.dom.tsx
2387 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s* (?:
2388 (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE
2389 |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR
2390 |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR
2391 |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)
2393 (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName
2394 |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop
2395 |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor
2396 |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption
2397 |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear
2398 |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete
2399 |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset
2400 |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight
2401 |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds
2402 |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize
2403 |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host
2404 |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth
2405 |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext
2406 |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom
2407 |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple
2408 |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName
2409 |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight
2410 |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer
2411 |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling
2412 |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText
2413 |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts
2414 |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove
2415 |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary
2416 |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead
2417 |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile
2418 |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\b(?!\$|\s*(<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?\()
2420 1: punctuation.accessor.tsx
2421 2: punctuation.accessor.optional.tsx
2422 3: support.constant.dom.tsx
2423 4: support.variable.property.dom.tsx
2425 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream
2426 |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\b(?!\$)
2427 scope: support.class.node.tsx
2429 (?x)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(process)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))(?:
2430 (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)
2432 (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)
2435 1: support.variable.object.process.tsx
2436 2: punctuation.accessor.tsx
2437 3: punctuation.accessor.optional.tsx
2438 4: support.variable.property.process.tsx
2439 5: support.function.process.tsx
2440 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(exports)|(module)(?:(?:(\.)|(\?\.(?!\s*[[:digit:]])))(exports|id|filename|loaded|parent|children))?)\b(?!\$)'
2442 1: support.type.object.module.tsx
2443 2: support.type.object.module.tsx
2444 3: punctuation.accessor.tsx
2445 4: punctuation.accessor.optional.tsx
2446 5: support.type.object.module.tsx
2447 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(global|GLOBAL|root|__dirname|__filename)\b(?!\$)'
2448 scope: support.variable.object.node.tsx
2450 (?x) (?:(\.)|(\?\.(?!\s*[[:digit:]]))) \s*
2452 (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|
2453 Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|
2454 Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|
2455 Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|
2456 Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|
2457 Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|
2458 Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|
2459 Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)
2461 (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|
2462 scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|
2463 sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|
2464 Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|
2465 Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|
2466 savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|
2467 contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|
2468 createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|
2469 test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|
2470 untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|
2471 print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|
2472 fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|
2473 forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|
2474 abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|
2475 releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|
2476 Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|
2477 Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|
2478 moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back
2480 (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|
2481 appendChild|appendData|before|blur|canPlayType|captureStream|
2482 caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|
2483 cloneContents|cloneNode|cloneRange|close|closest|collapse|
2484 compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|
2485 convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|
2486 createAttributeNS|createCaption|createCDATASection|createComment|
2487 createContextualFragment|createDocument|createDocumentFragment|
2488 createDocumentType|createElement|createElementNS|createEntityReference|
2489 createEvent|createExpression|createHTMLDocument|createNodeIterator|
2490 createNSResolver|createProcessingInstruction|createRange|createShadowRoot|
2491 createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|
2492 deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|
2493 deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|
2494 enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|
2495 exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|
2496 getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|
2497 getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|
2498 getClientRects|getContext|getDestinationInsertionPoints|getElementById|
2499 getElementsByClassName|getElementsByName|getElementsByTagName|
2500 getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|
2501 getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|
2502 hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|
2503 insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|
2504 insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|
2505 isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|
2506 lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|
2507 moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|
2508 parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|
2509 previousSibling|probablySupportsContext|queryCommandEnabled|
2510 queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|
2511 querySelector|querySelectorAll|registerContentHandler|registerElement|
2512 registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|
2513 removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|
2514 removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|
2515 requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|
2516 scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|
2517 setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|
2518 setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|
2519 setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|
2520 slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|
2521 submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|
2522 toDataURL|toggle|toString|values|write|writeln
2524 (all|catch|finally|race|reject|resolve|then
2528 1: punctuation.accessor.tsx
2529 2: punctuation.accessor.optional.tsx
2530 3: support.function.event-handler.tsx
2531 4: support.function.tsx
2532 5: support.function.dom.tsx
2533 6: support.function.promise.tsx
2535 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?=\bswitch\s*\()'
2537 - meta_scope: switch-statement.expr.tsx
2540 0: punctuation.definition.block.tsx
2542 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(switch)\s*(\()'
2544 1: keyword.control.switch.tsx
2545 2: meta.brace.round.tsx
2547 - meta_scope: switch-expression.expr.tsx
2550 0: meta.brace.round.tsx
2552 - include: expression
2555 0: punctuation.definition.block.tsx
2557 - meta_scope: switch-block.expr.tsx
2560 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(case|default(?=:))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2562 1: keyword.control.switch.tsx
2564 - meta_scope: case-clause.expr.tsx
2567 - include: expression
2568 - match: '(:)\s*(\{)'
2570 1: case-clause.expr.tsx punctuation.definition.section.case-statement.tsx
2571 2: meta.block.tsx punctuation.definition.block.tsx
2573 - meta_content_scope: meta.block.tsx
2576 0: meta.block.tsx punctuation.definition.block.tsx
2578 - include: statements
2581 0: case-clause.expr.tsx punctuation.definition.section.case-statement.tsx
2582 - include: statements
2584 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?=(<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>|\<\s*(((keyof|infer)\s+)|(([_$[:alpha:]][_$[:alnum:]]*|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\''[^\'']*\'')|(\"[^\"]*\")|(\`[^\`]*\`))(?=\s*([\<\>\,\.\[=]|&(?!&)|\|(?!\|)))))([^<>\(]|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(?<==)\>)*(?!=)\>)*(?!=)>\s*)`)'
2586 1: entity.name.function.tagged-template.tsx
2588 - meta_scope: string.template.tsx
2591 - include: type-arguments
2592 - match: "([_$[:alpha:]][_$[:alnum:]]*)?(`)"
2594 1: entity.name.function.tagged-template.tsx
2595 2: punctuation.definition.string.template.begin.tsx
2597 - meta_scope: string.template.tsx
2600 0: punctuation.definition.string.template.end.tsx
2602 - include: template-substitution-element
2603 - include: string-character-escape
2604 template-substitution-element:
2607 0: punctuation.definition.template-expression.begin.tsx
2609 - meta_scope: meta.template.expression.tsx
2610 - meta_content_scope: meta.embedded.line.tsx
2613 0: punctuation.definition.template-expression.end.tsx
2615 - include: expression
2617 - match: '(?!\?\.\s*[^[:digit:]])(\?)'
2619 1: keyword.operator.ternary.tsx
2623 1: keyword.operator.ternary.tsx
2625 - include: expression
2627 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))this\b(?!\$)'
2628 scope: variable.language.this.tsx
2632 - include: numeric-literal
2633 - include: type-primitive
2634 - include: type-builtin-literals
2635 - include: type-parameters
2636 - include: type-tuple
2637 - include: type-object
2638 - include: type-conditional
2639 - include: type-operators
2640 - include: type-fn-type-parameters
2641 - include: type-paren-or-function-parameters
2642 - include: type-function-return-type
2643 - include: type-name
2644 type-alias-declaration:
2645 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s*'
2647 1: keyword.control.export.tsx
2648 2: storage.type.type.tsx
2649 3: entity.name.type.alias.tsx
2651 - meta_scope: meta.type.declaration.tsx
2652 - match: '(?=\}|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)'
2655 - include: type-parameters
2658 1: keyword.operator.assignment.tsx
2660 - match: '(?=\}|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)'
2664 - match: (:)(?=\s*\S)
2666 1: keyword.operator.type.annotation.tsx
2668 - meta_scope: meta.type.annotation.tsx
2669 - match: '(?<![:|&])((?=$|^|[,);\}\]]|//)|(?==[^>])|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))'
2674 1: keyword.operator.type.annotation.tsx
2676 - meta_scope: meta.type.annotation.tsx
2677 - match: '(?<![:|&])((?=[,);\}\]]|//)|(?==[^>])|(?=^\s*$)|((?<=\S)(?=\s*$))|((?<=[\}>\]\)]|[_$[:alpha:]])\s*(?=\{)))'
2683 0: punctuation.definition.typeparameters.begin.tsx
2685 - meta_scope: meta.type.parameters.tsx
2688 0: punctuation.definition.typeparameters.end.tsx
2691 - include: punctuation-comma
2692 type-builtin-literals:
2693 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(this|true|false|undefined|null|object)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2694 scope: support.type.builtin.tsx
2696 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(extends)\s+'
2698 1: storage.modifier.tsx
2704 0: keyword.operator.ternary.tsx
2708 0: keyword.operator.ternary.tsx
2712 type-fn-type-parameters:
2713 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b(?=\s*\<)'
2714 scope: meta.type.constructor.tsx
2716 1: keyword.control.new.tsx
2717 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(new)\b\s*(?=\()'
2719 1: keyword.control.new.tsx
2721 - meta_scope: meta.type.constructor.tsx
2724 - include: function-parameters
2739 - meta_scope: meta.type.function.tsx
2742 - include: function-parameters
2743 type-function-return-type:
2744 - match: (=>)(?=\s*\S)
2746 1: storage.type.function.arrow.tsx
2748 - meta_scope: meta.type.function.return.tsx
2749 - match: '(?<!=>)(?<![|&])(?=[,\]\)\{\}=;>:\?]|//|$)'
2751 - include: type-function-return-type-core
2754 0: storage.type.function.arrow.tsx
2756 - meta_scope: meta.type.function.return.tsx
2757 - match: '(?<!=>)(?<![|&])((?=[,\]\)\{\}=;:\?>]|//|^\s*$)|((?<=\S)(?=\s*$)))'
2759 - include: type-function-return-type-core
2760 type-function-return-type-core:
2762 - match: '(?<==>)(?=\s*\{)'
2766 - include: type-object
2767 - include: type-predicate-operator
2770 - match: '([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))'
2772 1: entity.name.type.module.tsx
2773 2: punctuation.accessor.tsx
2774 3: punctuation.accessor.optional.tsx
2775 - match: "[_$[:alpha:]][_$[:alnum:]]*"
2776 scope: entity.name.type.tsx
2780 0: punctuation.definition.block.tsx
2782 - meta_scope: meta.object.type.tsx
2785 0: punctuation.definition.block.tsx
2788 - include: method-declaration
2789 - include: indexer-declaration
2790 - include: indexer-mapped-type-declaration
2791 - include: field-declaration
2792 - include: type-annotation
2795 0: keyword.operator.spread.tsx
2797 - match: '(?=\}|;|,|$)|(?<=\})'
2800 - include: punctuation-comma
2801 - include: punctuation-semicolon
2804 - include: typeof-operator
2805 - match: '(?:([&|])|(=(?!>)))(?=\s*\{)'
2807 1: keyword.operator.type.tsx
2808 2: keyword.operator.assignment.tsx
2812 - include: type-object
2813 - match: "([&|])|(=(?!>))"
2815 1: keyword.operator.type.tsx
2816 2: keyword.operator.assignment.tsx
2820 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))keyof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2821 scope: keyword.operator.expression.keyof.tsx
2823 scope: keyword.operator.ternary.tsx
2824 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))infer(?=\s+[_$[:alpha:]])'
2825 scope: keyword.operator.expression.infer.tsx
2826 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))import(?=\s*\()'
2827 scope: keyword.operator.expression.import.tsx
2831 1: punctuation.definition.typeparameters.begin.tsx
2833 - meta_scope: meta.type.parameters.tsx
2836 1: punctuation.definition.typeparameters.end.tsx
2839 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(extends)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2840 scope: storage.modifier.tsx
2842 - include: punctuation-comma
2843 type-paren-or-function-parameters:
2846 0: meta.brace.round.tsx
2848 - meta_scope: meta.type.paren.cover.tsx
2851 0: meta.brace.round.tsx
2853 - include: destructuring-parameter
2855 (?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=\s*(:\s*(
2866 (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))))
2868 1: storage.modifier.tsx
2869 2: keyword.operator.rest.tsx
2870 3: entity.name.function.tsx variable.language.this.tsx
2871 4: entity.name.function.tsx
2872 5: keyword.operator.optional.tsx
2873 - match: '(?x)(?:(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?<!=|:)(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))\s*(\??)(?=:)'
2875 1: storage.modifier.tsx
2876 2: keyword.operator.rest.tsx
2877 3: variable.parameter.tsx variable.language.this.tsx
2878 4: variable.parameter.tsx
2879 5: keyword.operator.optional.tsx
2880 - include: type-annotation
2882 scope: punctuation.separator.parameter.tsx
2884 type-predicate-operator:
2885 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))is(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2886 scope: keyword.operator.expression.is.tsx
2888 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(string|number|boolean|symbol|any|void|never)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2889 scope: support.type.primitive.tsx
2893 0: meta.brace.square.tsx
2895 - meta_scope: meta.type.tuple.tsx
2898 0: meta.brace.square.tsx
2901 - include: punctuation-comma
2903 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))typeof(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2904 scope: keyword.operator.expression.typeof.tsx
2906 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))undefined(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2907 scope: constant.language.undefined.tsx
2909 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2911 1: keyword.control.export.tsx
2914 - meta_scope: meta.var.expr.tsx
2915 - match: '((?=;|}|(\s+(of|in)\s+)|^\s*$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)|((?<=\S)(?<!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$)))'
2917 - include: destructuring-variable
2918 - include: var-single-variable
2919 - include: variable-initializer
2921 - match: (,)\s*(?!\S)
2923 1: punctuation.separator.comma.tsx
2925 - match: '(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
2928 - include: destructuring-variable
2929 - include: var-single-variable
2930 - include: punctuation-comma
2931 - include: punctuation-comma
2932 - match: '(?<![_$[:alnum:]])(?:(?<=\.\.\.)|(?<!\.))(?:(\bexport)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))'
2934 1: keyword.control.export.tsx
2937 - meta_scope: meta.var.expr.tsx
2938 - match: '((?=;|}|(\s+(of|in)\s+)|^\s*$|;|^\s*abstract\b|^\s*async\b|^\s*class\b|^\s*const\b|^\s*declare\b|^\s*enum\b|^\s*export\b|^\s*function\b|^\s*import\b|^\s*interface\b|^\s*let\b|^\s*module\b|^\s*namespace\b|^\s*return\b|^\s*type\b|^\s*var\b)|((?<=\S)(?<!^const|[^\._$[:alnum:]]const)(?=\s*$)))'
2940 - include: destructuring-const
2941 - include: var-single-const
2942 - include: variable-initializer
2944 - match: (,)\s*(?!\S)
2946 1: punctuation.separator.comma.tsx
2948 - match: '(?<!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?<=\S)(?=\s*$)))'
2951 - include: destructuring-const
2952 - include: var-single-const
2953 - include: punctuation-comma
2954 - include: punctuation-comma
2957 (?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s*
2958 # function assignment |
2961 (function\s*[(<*]) |
2963 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
2966 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
2967 # sure shot arrow functions even if => is on new line
2969 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
2973 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
2977 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
2979 # arrow function possible to detect only with => on same line
2981 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
2982 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
2983 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
2984 \s*=> # arrow operator
2988 # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
3000 (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
3001 (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3003 (function\s*[(<*]) |
3005 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3008 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3009 # sure shot arrow functions even if => is on new line
3011 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3015 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3019 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
3021 # arrow function possible to detect only with => on same line
3023 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3024 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3025 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3026 \s*=> # arrow operator
3031 1: meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx
3033 - meta_scope: meta.var-single-variable.expr.tsx
3034 - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3036 - include: var-single-variable-type-annotation
3037 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
3039 1: meta.definition.variable.tsx variable.other.constant.tsx
3041 - meta_scope: meta.var-single-variable.expr.tsx
3042 - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3044 - include: var-single-variable-type-annotation
3045 var-single-variable:
3047 (?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s*
3048 # function assignment |
3051 (function\s*[(<*]) |
3053 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3056 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3057 # sure shot arrow functions even if => is on new line
3059 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3063 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3067 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
3069 # arrow function possible to detect only with => on same line
3071 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3072 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3073 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3074 \s*=> # arrow operator
3078 # typeannotation is fn type: < | () | (... | (param: | (param, | (param? | (param= | (param) =>
3090 (:\s*((<\s*$)|([\(]\s*([\{\[]\s*)?$))) |
3091 (:\s*(=>|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(<[^<>]*>)|[^<>(),=])+=\s*(
3093 (function\s*[(<*]) |
3095 ([_$[:alpha:]][_$[:alnum:]]*\s*=>)
3098 ((<\s*$)|([\(]\s*([\{\[]\s*)?$)) |
3099 # sure shot arrow functions even if => is on new line
3101 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)?
3105 ((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
3109 [<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
3111 # arrow function possible to detect only with => on same line
3113 (<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<]|\<\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=<>]|=[^<])*\>)*>\s*)? # typeparameters
3114 \(\s*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
3115 (\s*:\s*([^<>\(\)]|\<[^<>]+\>|\([^\(\)]+\))+)? # return type
3116 \s*=> # arrow operator
3121 1: meta.definition.variable.tsx entity.name.function.tsx
3123 - meta_scope: meta.var-single-variable.expr.tsx
3124 - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3126 - include: var-single-variable-type-annotation
3127 - match: "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
3129 1: meta.definition.variable.tsx variable.other.constant.tsx
3131 - meta_scope: meta.var-single-variable.expr.tsx
3132 - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3134 - include: var-single-variable-type-annotation
3135 - match: "([_$[:alpha:]][_$[:alnum:]]*)"
3137 1: meta.definition.variable.tsx variable.other.readwrite.tsx
3139 - meta_scope: meta.var-single-variable.expr.tsx
3140 - match: '(?=$|^|[;,=}]|(\s+(of|in)\s+))'
3142 - include: var-single-variable-type-annotation
3143 var-single-variable-type-annotation:
3144 - include: type-annotation
3147 variable-initializer:
3148 - match: (?<!=|!)(=)(?!=)(?=\s*\S)
3150 1: keyword.operator.assignment.tsx
3152 - match: '(?=$|^|[,);}\]])'
3154 - include: expression
3155 - match: (?<!=|!)(=)(?!=)
3157 1: keyword.operator.assignment.tsx
3159 - match: '(?=[,);}\]])|(?=^\s*$)|(?<=\S)(?<!=)(?=\s*$)'
3161 - include: expression
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list