Elffuss BraidHub

kikocis/continue public

54ea0739010d · 98.3 KiBRawPermalink
1{
2 "name": "TypeScriptReact",
3 "scopeName": "source.tsx",
4 "fileTypes": [
5 "tsx"
6 ],
7 "uuid": "805375ec-d614-41f5-8993-5843fe63ea82",
8 "patterns": [
9 {
10 "include": "#directives"
11 },
12 {
13 "include": "#statements"
14 },
15 {
16 "name": "comment.line.shebang.ts",
17 "match": "\\A(#!).*(?=$)",
18 "captures": {
19 "1": {
20 "name": "punctuation.definition.comment.ts"
21 }
22 }
23 }
24 ],
25 "repository": {
26 "statements": {
27 "patterns": [
28 {
29 "include": "#string"
30 },
31 {
32 "include": "#template"
33 },
34 {
35 "include": "#comment"
36 },
37 {
38 "include": "#literal"
39 },
40 {
41 "include": "#declaration"
42 },
43 {
44 "include": "#switch-statement"
45 },
46 {
47 "include": "#for-loop"
48 },
49 {
50 "include": "#after-operator-block"
51 },
52 {
53 "include": "#decl-block"
54 },
55 {
56 "include": "#control-statement"
57 },
58 {
59 "include": "#expression"
60 },
61 {
62 "include": "#punctuation-semicolon"
63 }
64 ]
65 },
66 "var-expr": {
67 "name": "meta.var.expr.tsx",
68 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(var|let|const(?!\\s+enum\\b))\\b(?!\\$)",
69 "beginCaptures": {
70 "1": {
71 "name": "keyword.control.export.tsx"
72 },
73 "2": {
74 "name": "storage.type.tsx"
75 }
76 },
77 "end": "(?=$|;|}|(\\s+(of|in)\\s+))",
78 "patterns": [
79 {
80 "include": "#destructuring-variable"
81 },
82 {
83 "include": "#var-single-variable"
84 },
85 {
86 "include": "#variable-initializer"
87 },
88 {
89 "include": "#comment"
90 },
91 {
92 "include": "#punctuation-comma"
93 }
94 ]
95 },
96 "var-single-variable": {
97 "patterns": [
98 {
99 "name": "meta.var-single-variable.expr.tsx",
100 "begin": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))",
101 "beginCaptures": {
102 "1": {
103 "name": "entity.name.function.tsx"
104 }
105 },
106 "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
107 "patterns": [
108 {
109 "include": "#type-annotation"
110 },
111 {
112 "include": "#string"
113 },
114 {
115 "include": "#comment"
116 }
117 ]
118 },
119 {
120 "name": "meta.var-single-variable.expr.tsx",
121 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
122 "beginCaptures": {
123 "1": {
124 "name": "variable.other.readwrite.tsx"
125 }
126 },
127 "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
128 "patterns": [
129 {
130 "include": "#type-annotation"
131 },
132 {
133 "include": "#string"
134 },
135 {
136 "include": "#comment"
137 }
138 ]
139 }
140 ]
141 },
142 "destructuring-variable": {
143 "patterns": [
144 {
145 "name": "meta.object-binding-pattern-variable.tsx",
146 "begin": "(?<!=|:|of|in)\\s*(?=\\{)",
147 "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
148 "patterns": [
149 {
150 "include": "#object-binding-pattern"
151 },
152 {
153 "include": "#type-annotation"
154 },
155 {
156 "include": "#comment"
157 }
158 ]
159 },
160 {
161 "name": "meta.array-binding-pattern-variable.tsx",
162 "begin": "(?<!=|:|of|in)\\s*(?=\\[)",
163 "end": "(?=$|[;,=}]|(\\s+(of|in)\\s+))",
164 "patterns": [
165 {
166 "include": "#array-binding-pattern"
167 },
168 {
169 "include": "#type-annotation"
170 },
171 {
172 "include": "#comment"
173 }
174 ]
175 }
176 ]
177 },
178 "object-binding-element": {
179 "patterns": [
180 {
181 "include": "#comment"
182 },
183 {
184 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))",
185 "end": "(?=,|\\})",
186 "patterns": [
187 {
188 "include": "#object-binding-element-propertyName"
189 },
190 {
191 "include": "#binding-element"
192 }
193 ]
194 },
195 {
196 "include": "#object-binding-pattern"
197 },
198 {
199 "include": "#destructuring-variable-rest"
200 },
201 {
202 "include": "#variable-initializer"
203 },
204 {
205 "include": "#punctuation-comma"
206 }
207 ]
208 },
209 "object-binding-element-propertyName": {
210 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))",
211 "end": "(:)",
212 "endCaptures": {
213 "0": {
214 "name": "punctuation.destructuring.tsx"
215 }
216 },
217 "patterns": [
218 {
219 "include": "#string"
220 },
221 {
222 "include": "#array-literal"
223 },
224 {
225 "name": "variable.object.property.tsx",
226 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
227 }
228 ]
229 },
230 "binding-element": {
231 "patterns": [
232 {
233 "include": "#comment"
234 },
235 {
236 "include": "#object-binding-pattern"
237 },
238 {
239 "include": "#array-binding-pattern"
240 },
241 {
242 "include": "#destructuring-variable-rest"
243 },
244 {
245 "include": "#variable-initializer"
246 }
247 ]
248 },
249 "destructuring-variable-rest": {
250 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
251 "captures": {
252 "1": {
253 "name": "keyword.operator.rest.tsx"
254 },
255 "2": {
256 "name": "variable.other.readwrite.tsx"
257 }
258 }
259 },
260 "object-binding-pattern": {
261 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
262 "beginCaptures": {
263 "1": {
264 "name": "keyword.operator.rest.tsx"
265 },
266 "2": {
267 "name": "punctuation.definition.binding-pattern.object.tsx"
268 }
269 },
270 "end": "\\}",
271 "endCaptures": {
272 "0": {
273 "name": "punctuation.definition.binding-pattern.object.tsx"
274 }
275 },
276 "patterns": [
277 {
278 "include": "#object-binding-element"
279 }
280 ]
281 },
282 "array-binding-pattern": {
283 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
284 "beginCaptures": {
285 "1": {
286 "name": "keyword.operator.rest.tsx"
287 },
288 "2": {
289 "name": "punctuation.definition.binding-pattern.array.tsx"
290 }
291 },
292 "end": "\\]",
293 "endCaptures": {
294 "0": {
295 "name": "punctuation.definition.binding-pattern.array.tsx"
296 }
297 },
298 "patterns": [
299 {
300 "include": "#binding-element"
301 },
302 {
303 "include": "#punctuation-comma"
304 }
305 ]
306 },
307 "ternary-expression": {
308 "begin": "(?=\\?)",
309 "end": "(?=$|[;,})\\]])",
310 "patterns": [
311 {
312 "include": "#ternary-operator"
313 },
314 {
315 "include": "#expression"
316 }
317 ]
318 },
319 "ternary-operator": {
320 "begin": "(\\?)",
321 "beginCaptures": {
322 "0": {
323 "name": "keyword.operator.ternary.tsx"
324 }
325 },
326 "end": "(:)",
327 "endCaptures": {
328 "0": {
329 "name": "keyword.operator.ternary.tsx"
330 }
331 },
332 "patterns": [
333 {
334 "include": "#expression"
335 }
336 ]
337 },
338 "expression": {
339 "name": "meta.expression.tsx",
340 "patterns": [
341 {
342 "include": "#jsx"
343 },
344 {
345 "include": "#string"
346 },
347 {
348 "include": "#regex"
349 },
350 {
351 "include": "#template"
352 },
353 {
354 "include": "#comment"
355 },
356 {
357 "include": "#literal"
358 },
359 {
360 "include": "#function-declaration"
361 },
362 {
363 "include": "#class-or-interface-declaration"
364 },
365 {
366 "include": "#arrow-function"
367 },
368 {
369 "include": "#cast"
370 },
371 {
372 "include": "#ternary-expression"
373 },
374 {
375 "include": "#new-expr"
376 },
377 {
378 "include": "#object-literal"
379 },
380 {
381 "include": "#expression-operators"
382 },
383 {
384 "include": "#function-call"
385 },
386 {
387 "include": "#support-objects"
388 },
389 {
390 "include": "#identifiers"
391 },
392 {
393 "include": "#paren-expression"
394 },
395 {
396 "include": "#punctuation-comma"
397 },
398 {
399 "include": "#punctuation-accessor"
400 }
401 ]
402 },
403 "control-statement": {
404 "patterns": [
405 {
406 "name": "keyword.control.trycatch.tsx",
407 "match": "(?<!\\.|\\$)\\b(catch|finally|throw|try)\\b(?!\\$)"
408 },
409 {
410 "name": "keyword.control.loop.tsx",
411 "match": "(?<!\\.|\\$)\\b(break|continue|do|goto|while)\\b(?!\\$)"
412 },
413 {
414 "name": "keyword.control.flow.tsx",
415 "match": "(?<!\\.|\\$)\\b(return)\\b(?!\\$)"
416 },
417 {
418 "match": "(?<!\\.|\\$)\\b(yield)\\b(?!\\$)(?:\\s*(\\*))?",
419 "captures": {
420 "1": {
421 "name": "keyword.control.flow.tsx"
422 },
423 "2": {
424 "name": "keyword.generator.asterisk.tsx"
425 }
426 }
427 },
428 {
429 "name": "keyword.control.switch.tsx",
430 "match": "(?<!\\.|\\$)\\b(case|default|switch)\\b(?!\\$)"
431 },
432 {
433 "name": "keyword.control.conditional.tsx",
434 "match": "(?<!\\.|\\$)\\b(else|if)\\b(?!\\$)"
435 },
436 {
437 "name": "keyword.control.with.tsx",
438 "match": "(?<!\\.|\\$)\\b(with)\\b(?!\\$)"
439 },
440 {
441 "name": "keyword.other.debugger.tsx",
442 "match": "(?<!\\.|\\$)\\b(debugger)\\b(?!\\$)"
443 },
444 {
445 "name": "storage.modifier.tsx",
446 "match": "(?<!\\.|\\$)\\b(declare)\\b(?!\\$)"
447 }
448 ]
449 },
450 "declaration": {
451 "name": "meta.declaration.tsx",
452 "patterns": [
453 {
454 "include": "#decorator"
455 },
456 {
457 "include": "#var-expr"
458 },
459 {
460 "include": "#function-declaration"
461 },
462 {
463 "include": "#class-or-interface-declaration"
464 },
465 {
466 "include": "#type-declaration"
467 },
468 {
469 "include": "#enum-declaration"
470 },
471 {
472 "include": "#namespace-declaration"
473 },
474 {
475 "include": "#import-equals-declaration"
476 },
477 {
478 "include": "#import-declaration"
479 },
480 {
481 "include": "#export-declaration"
482 }
483 ]
484 },
485 "decorator": {
486 "name": "meta.decorator.tsx",
487 "begin": "(?<!\\.|\\$)\\@",
488 "beginCaptures": {
489 "0": {
490 "name": "punctuation.decorator.tsx"
491 }
492 },
493 "end": "(?=\\s)",
494 "patterns": [
495 {
496 "include": "#expression"
497 }
498 ]
499 },
500 "type-declaration": {
501 "name": "meta.type.declaration.tsx",
502 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(type)\\b\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*",
503 "beginCaptures": {
504 "1": {
505 "name": "keyword.control.export.tsx"
506 },
507 "2": {
508 "name": "storage.type.type.tsx"
509 },
510 "3": {
511 "name": "entity.name.type.tsx"
512 }
513 },
514 "end": "(?=[};]|\\bvar\\b|\\blet\\b|\\bconst\\b|\\btype\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\bnamespace\\b|\\bmodule\\b|\\bimport\\b|\\benum\\b|\\bdeclare\\b|\\bexport\\b|\\babstract\\b|\\basync\\b)",
515 "patterns": [
516 {
517 "include": "#comment"
518 },
519 {
520 "include": "#type-parameters"
521 },
522 {
523 "include": "#type"
524 },
525 {
526 "match": "(=)\\s*",
527 "captures": {
528 "1": {
529 "name": "keyword.operator.assignment.tsx"
530 }
531 }
532 }
533 ]
534 },
535 "enum-declaration": {
536 "name": "meta.enum.declaration.tsx",
537 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?(?:\\b(const)\\s+)?\\b(enum)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
538 "beginCaptures": {
539 "1": {
540 "name": "keyword.control.export.tsx"
541 },
542 "2": {
543 "name": "storage.modifier.tsx"
544 },
545 "3": {
546 "name": "storage.type.enum.tsx"
547 },
548 "4": {
549 "name": "entity.name.type.enum.tsx"
550 }
551 },
552 "end": "(?<=\\})",
553 "patterns": [
554 {
555 "include": "#comment"
556 },
557 {
558 "begin": "\\{",
559 "beginCaptures": {
560 "0": {
561 "name": "punctuation.definition.block.tsx"
562 }
563 },
564 "end": "\\}",
565 "endCaptures": {
566 "0": {
567 "name": "punctuation.definition.block.tsx"
568 }
569 },
570 "patterns": [
571 {
572 "include": "#comment"
573 },
574 {
575 "begin": "([_$[:alpha:]][_$[:alnum:]]*)",
576 "beginCaptures": {
577 "0": {
578 "name": "variable.other.enummember.tsx"
579 }
580 },
581 "end": "(?=,|\\}|$)",
582 "patterns": [
583 {
584 "include": "#comment"
585 },
586 {
587 "include": "#variable-initializer"
588 }
589 ]
590 },
591 {
592 "begin": "(?=((\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\])))",
593 "end": "(?=,|\\}|$)",
594 "patterns": [
595 {
596 "include": "#string"
597 },
598 {
599 "include": "#array-literal"
600 },
601 {
602 "include": "#comment"
603 },
604 {
605 "include": "#variable-initializer"
606 }
607 ]
608 },
609 {
610 "include": "#punctuation-comma"
611 }
612 ]
613 }
614 ]
615 },
616 "namespace-declaration": {
617 "name": "meta.namespace.declaration.tsx",
618 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(namespace|module)\\s+",
619 "beginCaptures": {
620 "1": {
621 "name": "keyword.control.export.tsx"
622 },
623 "2": {
624 "name": "storage.type.namespace.tsx"
625 }
626 },
627 "end": "(?=$|\\{)",
628 "patterns": [
629 {
630 "include": "#comment"
631 },
632 {
633 "include": "#string"
634 },
635 {
636 "name": "entity.name.type.module.tsx",
637 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
638 },
639 {
640 "name": "punctuation.accessor.tsx",
641 "match": "\\."
642 }
643 ]
644 },
645 "import-equals-declaration": {
646 "patterns": [
647 {
648 "name": "meta.import-equals.external.tsx",
649 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(require)\\s*(\\()",
650 "beginCaptures": {
651 "1": {
652 "name": "keyword.control.export.tsx"
653 },
654 "2": {
655 "name": "keyword.control.import.tsx"
656 },
657 "3": {
658 "name": "variable.other.readwrite.alias.tsx"
659 },
660 "4": {
661 "name": "keyword.operator.assignment.tsx"
662 },
663 "5": {
664 "name": "keyword.control.require.tsx"
665 },
666 "6": {
667 "name": "meta.brace.round.tsx"
668 }
669 },
670 "end": "\\)",
671 "endCaptures": {
672 "0": {
673 "name": "meta.brace.round.tsx"
674 }
675 },
676 "patterns": [
677 {
678 "include": "#comment"
679 },
680 {
681 "include": "#string"
682 }
683 ]
684 },
685 {
686 "name": "meta.import-equals.internal.tsx",
687 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)\\s+([_$[:alpha:]][_$[:alnum:]]*)\\s*(=)\\s*(?!require\\b)",
688 "beginCaptures": {
689 "1": {
690 "name": "keyword.control.export.tsx"
691 },
692 "2": {
693 "name": "keyword.control.import.tsx"
694 },
695 "3": {
696 "name": "variable.other.readwrite.alias.tsx"
697 },
698 "4": {
699 "name": "keyword.operator.assignment.tsx"
700 }
701 },
702 "end": "(?=;|$)",
703 "patterns": [
704 {
705 "include": "#comment"
706 },
707 {
708 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
709 "captures": {
710 "1": {
711 "name": "entity.name.type.module.tsx"
712 },
713 "2": {
714 "name": "punctuation.accessor.tsx"
715 }
716 }
717 },
718 {
719 "name": "variable.other.readwrite.tsx",
720 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
721 }
722 ]
723 }
724 ]
725 },
726 "import-declaration": {
727 "name": "meta.import.tsx",
728 "begin": "(?<!\\.|\\$)(?:(\\bexport)\\s+)?\\b(import)(?!(\\s*:)|(\\$))\\b",
729 "beginCaptures": {
730 "1": {
731 "name": "keyword.control.export.tsx"
732 },
733 "2": {
734 "name": "keyword.control.import.tsx"
735 }
736 },
737 "end": "(?=;|$)",
738 "patterns": [
739 {
740 "include": "#import-export-declaration"
741 }
742 ]
743 },
744 "export-declaration": {
745 "patterns": [
746 {
747 "match": "(?<!\\.|\\$)\\b(export)\\s+(as)\\s+(namespace)\\s+([_$[:alpha:]][_$[:alnum:]]*)",
748 "captures": {
749 "1": {
750 "name": "keyword.control.export.tsx"
751 },
752 "2": {
753 "name": "keyword.control.as.tsx"
754 },
755 "3": {
756 "name": "storage.type.namespace.tsx"
757 },
758 "4": {
759 "name": "entity.name.type.module.tsx"
760 }
761 }
762 },
763 {
764 "name": "meta.export.default.tsx",
765 "begin": "(?<!\\.|\\$)\\b(export)(?:(?:\\s*(=))|(?:\\s+(default)(?=\\s+)))",
766 "beginCaptures": {
767 "1": {
768 "name": "keyword.control.export.tsx"
769 },
770 "2": {
771 "name": "keyword.operator.assignment.tsx"
772 },
773 "3": {
774 "name": "keyword.control.default.tsx"
775 }
776 },
777 "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
778 "patterns": [
779 {
780 "include": "#expression"
781 }
782 ]
783 },
784 {
785 "name": "meta.export.tsx",
786 "begin": "(?<!\\.|\\$)\\b(export)(?!(\\s*:)|(\\$))\\b",
787 "beginCaptures": {
788 "0": {
789 "name": "keyword.control.export.tsx"
790 }
791 },
792 "end": "(?=;|\\bexport\\b|\\bfunction\\b|\\bclass\\b|\\binterface\\b|\\blet\\b|\\bvar\\b|\\bconst\\b|\\bimport\\b|\\benum\\b|\\bnamespace\\b|\\bmodule\\b|\\btype\\b|\\babstract\\b|\\bdeclare\\b|\\basync\\b|$)",
793 "patterns": [
794 {
795 "include": "#import-export-declaration"
796 }
797 ]
798 }
799 ]
800 },
801 "import-export-declaration": {
802 "patterns": [
803 {
804 "include": "#comment"
805 },
806 {
807 "include": "#string"
808 },
809 {
810 "include": "#import-export-block"
811 },
812 {
813 "name": "keyword.control.from.tsx",
814 "match": "\\bfrom\\b"
815 },
816 {
817 "include": "#import-export-clause"
818 }
819 ]
820 },
821 "import-export-block": {
822 "name": "meta.block.tsx",
823 "begin": "\\{",
824 "beginCaptures": {
825 "0": {
826 "name": "punctuation.definition.block.tsx"
827 }
828 },
829 "end": "\\}",
830 "endCaptures": {
831 "0": {
832 "name": "punctuation.definition.block.tsx"
833 }
834 },
835 "patterns": [
836 {
837 "include": "#import-export-clause"
838 }
839 ]
840 },
841 "import-export-clause": {
842 "patterns": [
843 {
844 "include": "#comment"
845 },
846 {
847 "comment": "(default|*|name) as alias",
848 "match": "(?x) (?: \\b(default)\\b | (\\*) | ([_$[:alpha:]][_$[:alnum:]]*)) \\s+ (as) \\s+ (?: (\\b default \\b | \\*) | ([_$[:alpha:]][_$[:alnum:]]*))",
849 "captures": {
850 "1": {
851 "name": "keyword.control.default.tsx"
852 },
853 "2": {
854 "name": "constant.language.import-export-all.tsx"
855 },
856 "3": {
857 "name": "variable.other.readwrite.tsx"
858 },
859 "4": {
860 "name": "keyword.control.as.tsx"
861 },
862 "5": {
863 "name": "invalid.illegal.tsx"
864 },
865 "6": {
866 "name": "variable.other.readwrite.alias.tsx"
867 }
868 }
869 },
870 {
871 "include": "#punctuation-comma"
872 },
873 {
874 "name": "constant.language.import-export-all.tsx",
875 "match": "\\*"
876 },
877 {
878 "name": "keyword.control.default.tsx",
879 "match": "\\b(default)\\b"
880 },
881 {
882 "name": "variable.other.readwrite.alias.tsx",
883 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
884 }
885 ]
886 },
887 "class-or-interface-declaration": {
888 "name": "meta.class.tsx",
889 "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?\\b(?:(abstract)\\s+)?\\b(?:(class)|(interface))\\b",
890 "beginCaptures": {
891 "1": {
892 "name": "keyword.control.export.tsx"
893 },
894 "2": {
895 "name": "storage.modifier.tsx"
896 },
897 "3": {
898 "name": "storage.type.class.tsx"
899 },
900 "4": {
901 "name": "storage.type.interface.tsx"
902 }
903 },
904 "end": "(?<=\\})",
905 "endCaptures": {
906 "1": {
907 "name": "punctuation.definition.block.tsx"
908 }
909 },
910 "patterns": [
911 {
912 "include": "#comment"
913 },
914 {
915 "include": "#class-or-interface-heritage"
916 },
917 {
918 "match": "[_$[:alpha:]][_$[:alnum:]]*",
919 "captures": {
920 "0": {
921 "name": "entity.name.type.class.tsx"
922 }
923 }
924 },
925 {
926 "include": "#type-parameters"
927 },
928 {
929 "include": "#class-or-interface-body"
930 }
931 ]
932 },
933 "class-or-interface-heritage": {
934 "begin": "(?<!\\.|\\$)(?:\\b(extends|implements)\\b)(?!\\$)",
935 "beginCaptures": {
936 "1": {
937 "name": "storage.modifier.tsx"
938 }
939 },
940 "end": "(?=\\{)",
941 "endCaptures": {
942 "1": {
943 "name": "punctuation.definition.block.tsx"
944 }
945 },
946 "patterns": [
947 {
948 "include": "#comment"
949 },
950 {
951 "include": "#class-or-interface-heritage"
952 },
953 {
954 "include": "#type-parameters"
955 },
956 {
957 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)(?=\\s*[_$[:alpha:]][_$[:alnum:]]*(\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)*\\s*([,<{]|extends|implements|//|/\\*))",
958 "captures": {
959 "1": {
960 "name": "entity.name.type.module.tsx"
961 },
962 "2": {
963 "name": "punctuation.accessor.tsx"
964 }
965 }
966 },
967 {
968 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*([,<{]|extends|implements|//|/\\*))",
969 "captures": {
970 "1": {
971 "name": "entity.other.inherited-class.tsx"
972 }
973 }
974 },
975 {
976 "include": "#expression"
977 }
978 ]
979 },
980 "class-or-interface-body": {
981 "begin": "\\{",
982 "beginCaptures": {
983 "0": {
984 "name": "punctuation.definition.block.tsx"
985 }
986 },
987 "end": "\\}",
988 "endCaptures": {
989 "0": {
990 "name": "punctuation.definition.block.tsx"
991 }
992 },
993 "patterns": [
994 {
995 "include": "#string"
996 },
997 {
998 "include": "#comment"
999 },
1000 {
1001 "include": "#decorator"
1002 },
1003 {
1004 "include": "#method-declaration"
1005 },
1006 {
1007 "include": "#indexer-declaration"
1008 },
1009 {
1010 "include": "#field-declaration"
1011 },
1012 {
1013 "include": "#type-annotation"
1014 },
1015 {
1016 "include": "#variable-initializer"
1017 },
1018 {
1019 "include": "#access-modifier"
1020 },
1021 {
1022 "include": "#property-accessor"
1023 },
1024 {
1025 "include": "#expression"
1026 },
1027 {
1028 "include": "#punctuation-comma"
1029 },
1030 {
1031 "include": "#punctuation-semicolon"
1032 }
1033 ]
1034 },
1035 "type-object": {
1036 "name": "meta.object.type.tsx",
1037 "begin": "\\{",
1038 "beginCaptures": {
1039 "0": {
1040 "name": "punctuation.definition.block.tsx"
1041 }
1042 },
1043 "end": "\\}",
1044 "endCaptures": {
1045 "0": {
1046 "name": "punctuation.definition.block.tsx"
1047 }
1048 },
1049 "patterns": [
1050 {
1051 "include": "#type-object-members"
1052 }
1053 ]
1054 },
1055 "type-object-members": {
1056 "patterns": [
1057 {
1058 "include": "#comment"
1059 },
1060 {
1061 "include": "#method-declaration"
1062 },
1063 {
1064 "include": "#indexer-declaration"
1065 },
1066 {
1067 "include": "#field-declaration"
1068 },
1069 {
1070 "include": "#type-annotation"
1071 },
1072 {
1073 "begin": "\\.\\.\\.",
1074 "beginCaptures": {
1075 "0": {
1076 "name": "keyword.operator.spread.tsx"
1077 }
1078 },
1079 "end": "(?=\\}|;|,|$)|(?<=\\})",
1080 "patterns": [
1081 {
1082 "include": "#type"
1083 }
1084 ]
1085 },
1086 {
1087 "include": "#punctuation-comma"
1088 },
1089 {
1090 "include": "#punctuation-semicolon"
1091 }
1092 ]
1093 },
1094 "field-declaration": {
1095 "name": "meta.field.declaration.tsx",
1096 "begin": "(?<!\\()(?:(?<!\\.|\\$)\\b(readonly)\\s+)?(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1097 "beginCaptures": {
1098 "1": {
1099 "name": "storage.modifier.tsx"
1100 }
1101 },
1102 "end": "(?=\\}|;|,|$)|(?<=\\})",
1103 "patterns": [
1104 {
1105 "include": "#variable-initializer"
1106 },
1107 {
1108 "begin": "(?=((?:[_$[:alpha:]][_$[:alnum:]]*)|(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\?\\s*)?(=|:))",
1109 "end": "(?=[};,=]|$)|(?<=\\})",
1110 "patterns": [
1111 {
1112 "include": "#type-annotation"
1113 },
1114 {
1115 "include": "#string"
1116 },
1117 {
1118 "include": "#array-literal"
1119 },
1120 {
1121 "include": "#comment"
1122 },
1123 {
1124 "name": "entity.name.function.tsx",
1125 "match": "(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=(\\?\\s*)?\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))"
1126 },
1127 {
1128 "name": "variable.object.property.tsx",
1129 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1130 },
1131 {
1132 "name": "keyword.operator.optional.tsx",
1133 "match": "\\?"
1134 }
1135 ]
1136 }
1137 ]
1138 },
1139 "method-declaration": {
1140 "name": "meta.method.declaration.tsx",
1141 "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
1142 "beginCaptures": {
1143 "1": {
1144 "name": "storage.modifier.tsx"
1145 },
1146 "2": {
1147 "name": "storage.modifier.tsx"
1148 },
1149 "3": {
1150 "name": "storage.modifier.async.tsx"
1151 },
1152 "4": {
1153 "name": "storage.type.property.tsx"
1154 },
1155 "5": {
1156 "name": "keyword.operator.new.tsx"
1157 },
1158 "6": {
1159 "name": "storage.type.tsx"
1160 },
1161 "7": {
1162 "name": "keyword.generator.asterisk.tsx"
1163 }
1164 },
1165 "end": "(?=\\}|;|,)|(?<=\\})",
1166 "patterns": [
1167 {
1168 "include": "#method-declaration-name"
1169 },
1170 {
1171 "include": "#comment"
1172 },
1173 {
1174 "include": "#type-parameters"
1175 },
1176 {
1177 "include": "#function-parameters"
1178 },
1179 {
1180 "include": "#return-type"
1181 },
1182 {
1183 "include": "#method-overload-declaration"
1184 },
1185 {
1186 "include": "#decl-block"
1187 }
1188 ]
1189 },
1190 "method-overload-declaration": {
1191 "begin": "(?<!\\.|\\$)(?:\\b(public|private|protected)\\s+)?(?:\\b(abstract)\\s+)?(?:\\b(async)\\s+)?(?:\\b(get|set)\\s+)?(?:(?:\\b(?:(new)|(constructor))\\b(?!\\$|:))|(?:(\\*)\\s*)?(?=((([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??))?\\s*[\\(\\<]))",
1192 "beginCaptures": {
1193 "1": {
1194 "name": "storage.modifier.tsx"
1195 },
1196 "2": {
1197 "name": "storage.modifier.tsx"
1198 },
1199 "3": {
1200 "name": "storage.modifier.async.tsx"
1201 },
1202 "4": {
1203 "name": "storage.type.property.tsx"
1204 },
1205 "5": {
1206 "name": "keyword.operator.new.tsx"
1207 },
1208 "6": {
1209 "name": "storage.type.tsx"
1210 },
1211 "7": {
1212 "name": "keyword.generator.asterisk.tsx"
1213 }
1214 },
1215 "end": "(?=\\(|\\<)",
1216 "patterns": [
1217 {
1218 "include": "#method-declaration-name"
1219 }
1220 ]
1221 },
1222 "method-declaration-name": {
1223 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(\\??)\\s*[\\(\\<])",
1224 "end": "(?=\\(|\\<)",
1225 "patterns": [
1226 {
1227 "include": "#string"
1228 },
1229 {
1230 "include": "#array-literal"
1231 },
1232 {
1233 "name": "entity.name.function.tsx",
1234 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1235 },
1236 {
1237 "name": "keyword.operator.optional.tsx",
1238 "match": "\\?"
1239 }
1240 ]
1241 },
1242 "indexer-declaration": {
1243 "name": "meta.indexer.declaration.tsx",
1244 "begin": "(?:(?<!\\.|\\$)\\b(readonly)\\s*)?(\\[)\\s*([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=:)",
1245 "beginCaptures": {
1246 "1": {
1247 "name": "storage.modifier.tsx"
1248 },
1249 "2": {
1250 "name": "meta.brace.square.tsx"
1251 },
1252 "3": {
1253 "name": "variable.parameter.tsx"
1254 }
1255 },
1256 "end": "(\\])\\s*(\\?\\s*)?|$",
1257 "endCaptures": {
1258 "1": {
1259 "name": "meta.brace.square.tsx"
1260 },
1261 "2": {
1262 "name": "keyword.operator.optional.tsx"
1263 }
1264 },
1265 "patterns": [
1266 {
1267 "include": "#type-annotation"
1268 }
1269 ]
1270 },
1271 "function-declaration": {
1272 "name": "meta.function.tsx",
1273 "begin": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1274 "beginCaptures": {
1275 "1": {
1276 "name": "keyword.control.export.tsx"
1277 },
1278 "2": {
1279 "name": "storage.modifier.async.tsx"
1280 },
1281 "3": {
1282 "name": "storage.type.function.tsx"
1283 },
1284 "4": {
1285 "name": "keyword.generator.asterisk.tsx"
1286 },
1287 "5": {
1288 "name": "entity.name.function.tsx"
1289 }
1290 },
1291 "end": "(?=;|\\})|(?<=\\})",
1292 "patterns": [
1293 {
1294 "include": "#comment"
1295 },
1296 {
1297 "include": "#type-parameters"
1298 },
1299 {
1300 "include": "#function-parameters"
1301 },
1302 {
1303 "include": "#return-type"
1304 },
1305 {
1306 "include": "#function-overload-declaration"
1307 },
1308 {
1309 "include": "#decl-block"
1310 }
1311 ]
1312 },
1313 "function-overload-declaration": {
1314 "name": "meta.function.overload.tsx",
1315 "match": "(?<!\\.|\\$)\\b(?:(export)\\s+)?(?:(async)\\s+)?(function\\b)(?:\\s*(\\*))?(?:(?:\\s+|(?<=\\*))([_$[:alpha:]][_$[:alnum:]]*))?\\s*",
1316 "captures": {
1317 "1": {
1318 "name": "keyword.control.export.tsx"
1319 },
1320 "2": {
1321 "name": "storage.modifier.async.tsx"
1322 },
1323 "3": {
1324 "name": "storage.type.function.tsx"
1325 },
1326 "4": {
1327 "name": "keyword.generator.asterisk.tsx"
1328 },
1329 "5": {
1330 "name": "entity.name.function.tsx"
1331 }
1332 }
1333 },
1334 "object-literal": {
1335 "name": "meta.objectliteral.tsx",
1336 "begin": "\\{",
1337 "beginCaptures": {
1338 "0": {
1339 "name": "punctuation.definition.block.tsx"
1340 }
1341 },
1342 "end": "\\}",
1343 "endCaptures": {
1344 "0": {
1345 "name": "punctuation.definition.block.tsx"
1346 }
1347 },
1348 "patterns": [
1349 {
1350 "include": "#object-member"
1351 }
1352 ]
1353 },
1354 "decl-block": {
1355 "name": "meta.block.tsx",
1356 "begin": "\\{",
1357 "beginCaptures": {
1358 "0": {
1359 "name": "punctuation.definition.block.tsx"
1360 }
1361 },
1362 "end": "\\}",
1363 "endCaptures": {
1364 "0": {
1365 "name": "punctuation.definition.block.tsx"
1366 }
1367 },
1368 "patterns": [
1369 {
1370 "include": "#statements"
1371 }
1372 ]
1373 },
1374 "after-operator-block": {
1375 "name": "meta.objectliteral.tsx",
1376 "begin": "(?<=[=(,\\[?+!]|await|return|yield|throw|in|of|typeof|&&|\\|\\||\\*)\\s*(\\{)",
1377 "beginCaptures": {
1378 "1": {
1379 "name": "punctuation.definition.block.tsx"
1380 }
1381 },
1382 "end": "\\}",
1383 "endCaptures": {
1384 "0": {
1385 "name": "punctuation.definition.block.tsx"
1386 }
1387 },
1388 "patterns": [
1389 {
1390 "include": "#object-member"
1391 }
1392 ]
1393 },
1394 "parameter-name": {
1395 "patterns": [
1396 {
1397 "match": "(?x)(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)(?=\\s* (=\\s*( (async\\s+) | (function\\s*[(<]) | (function\\s+) | ([_$[:alpha:]][_$[:alnum:]]*\\s*=>) | ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)) ) | (:\\s*( (<) | ([(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ))) ))",
1398 "captures": {
1399 "1": {
1400 "name": "storage.modifier.tsx"
1401 },
1402 "2": {
1403 "name": "storage.modifier.tsx"
1404 },
1405 "3": {
1406 "name": "keyword.operator.rest.tsx"
1407 },
1408 "4": {
1409 "name": "entity.name.function.tsx"
1410 },
1411 "5": {
1412 "name": "keyword.operator.optional.tsx"
1413 }
1414 }
1415 },
1416 {
1417 "match": "(?:\\s*\\b(readonly)\\s+)?(?:\\s*\\b(public|private|protected)\\s+)?(\\.\\.\\.)?\\s*(?<!=|:)([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\??)",
1418 "captures": {
1419 "1": {
1420 "name": "storage.modifier.tsx"
1421 },
1422 "2": {
1423 "name": "storage.modifier.tsx"
1424 },
1425 "3": {
1426 "name": "keyword.operator.rest.tsx"
1427 },
1428 "4": {
1429 "name": "variable.parameter.tsx"
1430 },
1431 "5": {
1432 "name": "keyword.operator.optional.tsx"
1433 }
1434 }
1435 }
1436 ]
1437 },
1438 "destructuring-parameter": {
1439 "patterns": [
1440 {
1441 "name": "meta.parameter.object-binding-pattern.tsx",
1442 "begin": "(?<!=|:)\\s*(\\{)",
1443 "beginCaptures": {
1444 "1": {
1445 "name": "punctuation.definition.binding-pattern.object.tsx"
1446 }
1447 },
1448 "end": "\\}",
1449 "endCaptures": {
1450 "0": {
1451 "name": "punctuation.definition.binding-pattern.object.tsx"
1452 }
1453 },
1454 "patterns": [
1455 {
1456 "include": "#parameter-object-binding-element"
1457 }
1458 ]
1459 },
1460 {
1461 "name": "meta.paramter.array-binding-pattern.tsx",
1462 "begin": "(?<!=|:)\\s*(\\[)",
1463 "beginCaptures": {
1464 "1": {
1465 "name": "punctuation.definition.binding-pattern.array.tsx"
1466 }
1467 },
1468 "end": "\\]",
1469 "endCaptures": {
1470 "0": {
1471 "name": "punctuation.definition.binding-pattern.array.tsx"
1472 }
1473 },
1474 "patterns": [
1475 {
1476 "include": "#parameter-binding-element"
1477 },
1478 {
1479 "include": "#punctuation-comma"
1480 }
1481 ]
1482 }
1483 ]
1484 },
1485 "parameter-object-binding-element": {
1486 "patterns": [
1487 {
1488 "include": "#comment"
1489 },
1490 {
1491 "begin": "(?=(([_$[:alpha:]][_$[:alnum:]]*)|(\\'[^']*\\')|(\\\"[^\"]*\\\")|(\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*(:))",
1492 "end": "(?=,|\\})",
1493 "patterns": [
1494 {
1495 "include": "#object-binding-element-propertyName"
1496 },
1497 {
1498 "include": "#parameter-binding-element"
1499 }
1500 ]
1501 },
1502 {
1503 "include": "#parameter-object-binding-pattern"
1504 },
1505 {
1506 "include": "#destructuring-parameter-rest"
1507 },
1508 {
1509 "include": "#variable-initializer"
1510 },
1511 {
1512 "include": "#punctuation-comma"
1513 }
1514 ]
1515 },
1516 "parameter-binding-element": {
1517 "patterns": [
1518 {
1519 "include": "#comment"
1520 },
1521 {
1522 "include": "#parameter-object-binding-pattern"
1523 },
1524 {
1525 "include": "#parameter-array-binding-pattern"
1526 },
1527 {
1528 "include": "#destructuring-parameter-rest"
1529 },
1530 {
1531 "include": "#variable-initializer"
1532 }
1533 ]
1534 },
1535 "destructuring-parameter-rest": {
1536 "match": "(?:(\\.\\.\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)",
1537 "captures": {
1538 "1": {
1539 "name": "keyword.operator.rest.tsx"
1540 },
1541 "2": {
1542 "name": "variable.parameter.tsx"
1543 }
1544 }
1545 },
1546 "parameter-object-binding-pattern": {
1547 "begin": "(?:(\\.\\.\\.)\\s*)?(\\{)",
1548 "beginCaptures": {
1549 "1": {
1550 "name": "keyword.operator.rest.tsx"
1551 },
1552 "2": {
1553 "name": "punctuation.definition.binding-pattern.object.tsx"
1554 }
1555 },
1556 "end": "\\}",
1557 "endCaptures": {
1558 "0": {
1559 "name": "punctuation.definition.binding-pattern.object.tsx"
1560 }
1561 },
1562 "patterns": [
1563 {
1564 "include": "#parameter-object-binding-element"
1565 }
1566 ]
1567 },
1568 "parameter-array-binding-pattern": {
1569 "begin": "(?:(\\.\\.\\.)\\s*)?(\\[)",
1570 "beginCaptures": {
1571 "1": {
1572 "name": "keyword.operator.rest.tsx"
1573 },
1574 "2": {
1575 "name": "punctuation.definition.binding-pattern.array.tsx"
1576 }
1577 },
1578 "end": "\\]",
1579 "endCaptures": {
1580 "0": {
1581 "name": "punctuation.definition.binding-pattern.array.tsx"
1582 }
1583 },
1584 "patterns": [
1585 {
1586 "include": "#parameter-binding-element"
1587 },
1588 {
1589 "include": "#punctuation-comma"
1590 }
1591 ]
1592 },
1593 "return-type": {
1594 "name": "meta.return.type.tsx",
1595 "begin": "(?<=\\))\\s*(:)",
1596 "beginCaptures": {
1597 "1": {
1598 "name": "keyword.operator.type.annotation.tsx"
1599 }
1600 },
1601 "end": "(?<!:)((?=$)|(?=\\{|;|//|\\}))",
1602 "patterns": [
1603 {
1604 "include": "#comment"
1605 },
1606 {
1607 "name": "meta.object.type.tsx",
1608 "begin": "(?<=:)\\s*(\\{)",
1609 "beginCaptures": {
1610 "1": {
1611 "name": "punctuation.definition.block.tsx"
1612 }
1613 },
1614 "end": "\\}",
1615 "endCaptures": {
1616 "0": {
1617 "name": "punctuation.definition.block.tsx"
1618 }
1619 },
1620 "patterns": [
1621 {
1622 "include": "#type-object-members"
1623 }
1624 ]
1625 },
1626 {
1627 "include": "#type-predicate-operator"
1628 },
1629 {
1630 "include": "#type"
1631 }
1632 ]
1633 },
1634 "type-predicate-operator": {
1635 "name": "keyword.operator.expression.is.tsx",
1636 "match": "(?<!\\.|\\$)\\bis\\b(?!\\$)"
1637 },
1638 "type-annotation": {
1639 "name": "meta.type.annotation.tsx",
1640 "begin": ":",
1641 "beginCaptures": {
1642 "0": {
1643 "name": "keyword.operator.type.annotation.tsx"
1644 }
1645 },
1646 "end": "(?=$|[,);\\}\\]]|//)|(?==[^>])|(?<=[\\}>\\]\\)]|[_$[:alpha:]])\\s*(?=\\{)",
1647 "patterns": [
1648 {
1649 "include": "#comment"
1650 },
1651 {
1652 "include": "#type"
1653 }
1654 ]
1655 },
1656 "type": {
1657 "name": "meta.type.tsx",
1658 "patterns": [
1659 {
1660 "include": "#comment"
1661 },
1662 {
1663 "include": "#string"
1664 },
1665 {
1666 "include": "#numeric-literal"
1667 },
1668 {
1669 "include": "#type-primitive"
1670 },
1671 {
1672 "include": "#type-builtin-literals"
1673 },
1674 {
1675 "include": "#type-parameters"
1676 },
1677 {
1678 "include": "#type-tuple"
1679 },
1680 {
1681 "include": "#type-object"
1682 },
1683 {
1684 "include": "#type-operators"
1685 },
1686 {
1687 "include": "#type-fn-type-parameters"
1688 },
1689 {
1690 "include": "#type-paren-or-function-parameters"
1691 },
1692 {
1693 "include": "#type-function-return-type"
1694 },
1695 {
1696 "include": "#type-name"
1697 }
1698 ]
1699 },
1700 "function-parameters": {
1701 "name": "meta.parameters.tsx",
1702 "begin": "\\(",
1703 "beginCaptures": {
1704 "0": {
1705 "name": "punctuation.definition.parameters.begin.tsx"
1706 }
1707 },
1708 "end": "\\)",
1709 "endCaptures": {
1710 "0": {
1711 "name": "punctuation.definition.parameters.end.tsx"
1712 }
1713 },
1714 "patterns": [
1715 {
1716 "include": "#comment"
1717 },
1718 {
1719 "include": "#decorator"
1720 },
1721 {
1722 "include": "#destructuring-parameter"
1723 },
1724 {
1725 "include": "#parameter-name"
1726 },
1727 {
1728 "include": "#type-annotation"
1729 },
1730 {
1731 "include": "#variable-initializer"
1732 },
1733 {
1734 "name": "punctuation.separator.parameter.tsx",
1735 "match": ","
1736 }
1737 ]
1738 },
1739 "type-primitive": {
1740 "name": "support.type.primitive.tsx",
1741 "match": "(?<!\\.|\\$)\\b(string|number|boolean|symbol|any|void|never)\\b(?!\\$)"
1742 },
1743 "type-builtin-literals": {
1744 "name": "support.type.builtin.tsx",
1745 "match": "(?<!\\.|\\$)\\b(this|true|false|undefined|null)\\b(?!\\$)"
1746 },
1747 "type-paren-or-function-parameters": {
1748 "name": "meta.type.paren.cover.tsx",
1749 "begin": "\\(",
1750 "beginCaptures": {
1751 "0": {
1752 "name": "meta.brace.round.tsx"
1753 }
1754 },
1755 "end": "\\)",
1756 "endCaptures": {
1757 "0": {
1758 "name": "meta.brace.round.tsx"
1759 }
1760 },
1761 "patterns": [
1762 {
1763 "include": "#type"
1764 },
1765 {
1766 "include": "#function-parameters"
1767 }
1768 ]
1769 },
1770 "type-fn-type-parameters": {
1771 "patterns": [
1772 {
1773 "name": "meta.type.constructor.tsx",
1774 "match": "(?<!\\.|\\$)\\b(new)\\b(?=\\s*\\<)",
1775 "captures": {
1776 "1": {
1777 "name": "keyword.control.new.tsx"
1778 }
1779 }
1780 },
1781 {
1782 "name": "meta.type.constructor.tsx",
1783 "begin": "(?<!\\.|\\$)\\b(new)\\b\\s*(?=\\()",
1784 "beginCaptures": {
1785 "1": {
1786 "name": "keyword.control.new.tsx"
1787 }
1788 },
1789 "end": "(?<=\\))",
1790 "patterns": [
1791 {
1792 "include": "#function-parameters"
1793 }
1794 ]
1795 },
1796 {
1797 "name": "meta.type.function.tsx",
1798 "begin": "(?<=\\>)\\s*(?=\\()",
1799 "end": "(?<=\\))",
1800 "patterns": [
1801 {
1802 "include": "#function-parameters"
1803 }
1804 ]
1805 },
1806 {
1807 "name": "meta.type.function.tsx",
1808 "begin": "(?x)( (?= [(]\\s*( ([)]) | (\\.\\.\\.) | ([_$[:alnum:]]+\\s*( ([:,?=])| ([)]\\s*=>) )) ) ) )",
1809 "end": "(?<=\\))",
1810 "patterns": [
1811 {
1812 "include": "#function-parameters"
1813 }
1814 ]
1815 }
1816 ]
1817 },
1818 "type-operators": {
1819 "patterns": [
1820 {
1821 "include": "#typeof-operator"
1822 },
1823 {
1824 "name": "keyword.operator.type.tsx",
1825 "match": "[&|]"
1826 },
1827 {
1828 "name": "keyword.operator.expression.keyof.tsx",
1829 "match": "(?<!\\.|\\$)\\bkeyof\\b(?!\\$)"
1830 }
1831 ]
1832 },
1833 "type-function-return-type": {
1834 "name": "meta.type.function.return.tsx",
1835 "begin": "=>",
1836 "beginCaptures": {
1837 "0": {
1838 "name": "storage.type.function.arrow.tsx"
1839 }
1840 },
1841 "end": "(?<!=>)(?=[,\\]\\)\\{\\}=;>]|//|$)",
1842 "patterns": [
1843 {
1844 "include": "#comment"
1845 },
1846 {
1847 "name": "meta.object.type.tsx",
1848 "begin": "(?<==>)\\s*(\\{)",
1849 "beginCaptures": {
1850 "1": {
1851 "name": "punctuation.definition.block.tsx"
1852 }
1853 },
1854 "end": "\\}",
1855 "endCaptures": {
1856 "0": {
1857 "name": "punctuation.definition.block.tsx"
1858 }
1859 },
1860 "patterns": [
1861 {
1862 "include": "#type-object-members"
1863 }
1864 ]
1865 },
1866 {
1867 "include": "#type-predicate-operator"
1868 },
1869 {
1870 "include": "#type"
1871 }
1872 ]
1873 },
1874 "type-tuple": {
1875 "name": "meta.type.tuple.tsx",
1876 "begin": "\\[",
1877 "beginCaptures": {
1878 "0": {
1879 "name": "meta.brace.square.tsx"
1880 }
1881 },
1882 "end": "\\]",
1883 "endCaptures": {
1884 "0": {
1885 "name": "meta.brace.square.tsx"
1886 }
1887 },
1888 "patterns": [
1889 {
1890 "include": "#type"
1891 },
1892 {
1893 "include": "#punctuation-comma"
1894 }
1895 ]
1896 },
1897 "type-name": {
1898 "patterns": [
1899 {
1900 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(\\.)",
1901 "captures": {
1902 "1": {
1903 "name": "entity.name.type.module.tsx"
1904 },
1905 "2": {
1906 "name": "punctuation.accessor.tsx"
1907 }
1908 }
1909 },
1910 {
1911 "name": "entity.name.type.tsx",
1912 "match": "[_$[:alpha:]][_$[:alnum:]]*"
1913 }
1914 ]
1915 },
1916 "type-parameters": {
1917 "name": "meta.type.parameters.tsx",
1918 "begin": "(<)",
1919 "beginCaptures": {
1920 "1": {
1921 "name": "punctuation.definition.typeparameters.begin.tsx"
1922 }
1923 },
1924 "end": "(?=$)|(>)",
1925 "endCaptures": {
1926 "1": {
1927 "name": "punctuation.definition.typeparameters.end.tsx"
1928 }
1929 },
1930 "patterns": [
1931 {
1932 "include": "#comment"
1933 },
1934 {
1935 "name": "storage.modifier.tsx",
1936 "match": "(?<!\\.|\\$)\\b(extends)\\b(?!\\$)"
1937 },
1938 {
1939 "include": "#type"
1940 },
1941 {
1942 "include": "#punctuation-comma"
1943 }
1944 ]
1945 },
1946 "variable-initializer": {
1947 "begin": "(?<!=|!)(=)(?!=)",
1948 "beginCaptures": {
1949 "1": {
1950 "name": "keyword.operator.assignment.tsx"
1951 }
1952 },
1953 "end": "(?=$|[,);}\\]])",
1954 "patterns": [
1955 {
1956 "include": "#expression"
1957 }
1958 ]
1959 },
1960 "for-loop": {
1961 "begin": "(?<!\\.|\\$)\\b(for)\\s*(\\()",
1962 "beginCaptures": {
1963 "1": {
1964 "name": "keyword.control.loop.tsx"
1965 },
1966 "2": {
1967 "name": "meta.brace.round.tsx"
1968 }
1969 },
1970 "end": "\\)",
1971 "endCaptures": {
1972 "0": {
1973 "name": "meta.brace.round.tsx"
1974 }
1975 },
1976 "patterns": [
1977 {
1978 "include": "#var-expr"
1979 },
1980 {
1981 "include": "#expression"
1982 },
1983 {
1984 "include": "#punctuation-semicolon"
1985 }
1986 ]
1987 },
1988 "switch-expression": {
1989 "name": "switch-expression.expr.tsx",
1990 "begin": "(?<!\\.|\\$)\\b(switch)\\s*(\\()",
1991 "beginCaptures": {
1992 "1": {
1993 "name": "keyword.control.switch.tsx"
1994 },
1995 "2": {
1996 "name": "meta.brace.round.tsx"
1997 }
1998 },
1999 "end": "\\)",
2000 "endCaptures": {
2001 "0": {
2002 "name": "meta.brace.round.tsx"
2003 }
2004 },
2005 "patterns": [
2006 {
2007 "include": "#expression"
2008 }
2009 ]
2010 },
2011 "switch-block": {
2012 "name": "switch-block.expr.tsx",
2013 "begin": "{",
2014 "beginCaptures": {
2015 "0": {
2016 "name": "punctuation.definition.block.tsx"
2017 }
2018 },
2019 "end": "(?=\\})",
2020 "patterns": [
2021 {
2022 "include": "#case-clause"
2023 },
2024 {
2025 "include": "#statements"
2026 }
2027 ]
2028 },
2029 "case-clause": {
2030 "name": "case-clause.expr.tsx",
2031 "begin": "(?<!\\.|\\$)\\b(case|default(?=:))\\b(?!\\$)",
2032 "beginCaptures": {
2033 "1": {
2034 "name": "keyword.control.switch.tsx"
2035 }
2036 },
2037 "end": ":",
2038 "endCaptures": {
2039 "0": {
2040 "name": "punctuation.definition.section.case-statement.tsx"
2041 }
2042 },
2043 "patterns": [
2044 {
2045 "include": "#expression"
2046 }
2047 ]
2048 },
2049 "switch-statement": {
2050 "name": "switch-statement.expr.tsx",
2051 "begin": "(?<!\\.|\\$)(?=\\bswitch\\s*\\()",
2052 "end": "}",
2053 "endCaptures": {
2054 "0": {
2055 "name": "punctuation.definition.block.tsx"
2056 }
2057 },
2058 "patterns": [
2059 {
2060 "include": "#switch-expression"
2061 },
2062 {
2063 "include": "#switch-block"
2064 }
2065 ]
2066 },
2067 "support-objects": {
2068 "patterns": [
2069 {
2070 "name": "variable.language.arguments.tsx",
2071 "match": "(?<!\\.|\\$)\\b(arguments)\\b(?!\\$)"
2072 },
2073 {
2074 "name": "support.class.builtin.tsx",
2075 "match": "(?x)(?<!\\.|\\$)\\b(Array|ArrayBuffer|Atomics|Boolean|DataView|Date|Float32Array|Float64Array|Function|Generator |GeneratorFunction|Int8Array|Int16Array|Int32Array|Intl|Map|Number|Object|Promise|Proxy |Reflect|RegExp|Set|SharedArrayBuffer|SIMD|String|Symbol|TypedArray |Uint8Array|Uint16Array|Uint32Array|Uint8ClampedArray|WeakMap|WeakSet)\\b(?!\\$)"
2076 },
2077 {
2078 "name": "support.class.error.tsx",
2079 "match": "(?<!\\.|\\$)\\b((Eval|Internal|Range|Reference|Syntax|Type|URI)?Error)\\b(?!\\$)"
2080 },
2081 {
2082 "name": "support.function.tsx",
2083 "match": "(?x)(?<!\\.|\\$)\\b(clear(Interval|Timeout)|decodeURI|decodeURIComponent|encodeURI|encodeURIComponent|escape|eval| isFinite|isNaN|parseFloat|parseInt|require|set(Interval|Timeout)|super|unescape|uneval)(?=\\s*\\()"
2084 },
2085 {
2086 "match": "(?x)(?<!\\.|\\$)\\b(Math)(?:\\s*(\\.)\\s*(?:\n (abs|acos|acosh|asin|asinh|atan|atan2|atanh|cbrt|ceil|clz32|cos|cosh|exp|\n expm1|floor|fround|hypot|imul|log|log10|log1p|log2|max|min|pow|random|\n round|sign|sin|sinh|sqrt|tan|tanh|trunc)\n |\n (E|LN10|LN2|LOG10E|LOG2E|PI|SQRT1_2|SQRT2)))?\\b(?!\\$)",
2087 "captures": {
2088 "1": {
2089 "name": "support.constant.math.tsx"
2090 },
2091 "2": {
2092 "name": "punctuation.accessor.tsx"
2093 },
2094 "3": {
2095 "name": "support.function.math.tsx"
2096 },
2097 "4": {
2098 "name": "support.constant.property.math.tsx"
2099 }
2100 }
2101 },
2102 {
2103 "match": "(?x)(?<!\\.|\\$)\\b(console)(?:\\s*(\\.)\\s*(\n assert|clear|count|debug|dir|error|group|groupCollapsed|groupEnd|info|log\n |profile|profileEnd|table|time|timeEnd|timeStamp|trace|warn))?\\b(?!\\$)",
2104 "captures": {
2105 "1": {
2106 "name": "support.class.console.tsx"
2107 },
2108 "2": {
2109 "name": "punctuation.accessor.tsx"
2110 },
2111 "3": {
2112 "name": "support.function.console.tsx"
2113 }
2114 }
2115 },
2116 {
2117 "match": "(?<!\\.|\\$)\\b(JSON)(?:\\s*(\\.)\\s*(parse|stringify))?\\b(?!\\$)",
2118 "captures": {
2119 "1": {
2120 "name": "support.constant.json.tsx"
2121 },
2122 "2": {
2123 "name": "punctuation.accessor.tsx"
2124 },
2125 "3": {
2126 "name": "support.function.json.tsx"
2127 }
2128 }
2129 },
2130 {
2131 "match": "(?x) (\\.) \\s* (?:\n (constructor|length|prototype|__proto__) \n |\n (EPSILON|MAX_SAFE_INTEGER|MAX_VALUE|MIN_SAFE_INTEGER|MIN_VALUE|NEGATIVE_INFINITY|POSITIVE_INFINITY))\\b(?!\\$)",
2132 "captures": {
2133 "1": {
2134 "name": "punctuation.accessor.tsx"
2135 },
2136 "2": {
2137 "name": "support.variable.property.tsx"
2138 },
2139 "3": {
2140 "name": "support.constant.tsx"
2141 }
2142 }
2143 },
2144 {
2145 "match": "(?x) (?<!\\.|\\$) \\b (?:\n (document|event|navigator|performance|screen|window) \n |\n (AnalyserNode|ArrayBufferView|Attr|AudioBuffer|AudioBufferSourceNode|AudioContext|AudioDestinationNode|AudioListener\n |AudioNode|AudioParam|BatteryManager|BeforeUnloadEvent|BiquadFilterNode|Blob|BufferSource|ByteString|CSS|CSSConditionRule\n |CSSCounterStyleRule|CSSGroupingRule|CSSMatrix|CSSMediaRule|CSSPageRule|CSSPrimitiveValue|CSSRule|CSSRuleList|CSSStyleDeclaration\n |CSSStyleRule|CSSStyleSheet|CSSSupportsRule|CSSValue|CSSValueList|CanvasGradient|CanvasImageSource|CanvasPattern\n |CanvasRenderingContext2D|ChannelMergerNode|ChannelSplitterNode|CharacterData|ChromeWorker|CloseEvent|Comment|CompositionEvent\n |Console|ConvolverNode|Coordinates|Credential|CredentialsContainer|Crypto|CryptoKey|CustomEvent|DOMError|DOMException\n |DOMHighResTimeStamp|DOMImplementation|DOMString|DOMStringList|DOMStringMap|DOMTimeStamp|DOMTokenList|DataTransfer\n |DataTransferItem|DataTransferItemList|DedicatedWorkerGlobalScope|DelayNode|DeviceProximityEvent|DirectoryEntry\n |DirectoryEntrySync|DirectoryReader|DirectoryReaderSync|Document|DocumentFragment|DocumentTouch|DocumentType|DragEvent\n |DynamicsCompressorNode|Element|Entry|EntrySync|ErrorEvent|Event|EventListener|EventSource|EventTarget|FederatedCredential\n |FetchEvent|File|FileEntry|FileEntrySync|FileException|FileList|FileReader|FileReaderSync|FileSystem|FileSystemSync\n |FontFace|FormData|GainNode|Gamepad|GamepadButton|GamepadEvent|Geolocation|GlobalEventHandlers|HTMLAnchorElement\n |HTMLAreaElement|HTMLAudioElement|HTMLBRElement|HTMLBaseElement|HTMLBodyElement|HTMLButtonElement|HTMLCanvasElement\n |HTMLCollection|HTMLContentElement|HTMLDListElement|HTMLDataElement|HTMLDataListElement|HTMLDialogElement|HTMLDivElement\n |HTMLDocument|HTMLElement|HTMLEmbedElement|HTMLFieldSetElement|HTMLFontElement|HTMLFormControlsCollection|HTMLFormElement\n |HTMLHRElement|HTMLHeadElement|HTMLHeadingElement|HTMLHtmlElement|HTMLIFrameElement|HTMLImageElement|HTMLInputElement\n |HTMLKeygenElement|HTMLLIElement|HTMLLabelElement|HTMLLegendElement|HTMLLinkElement|HTMLMapElement|HTMLMediaElement\n |HTMLMetaElement|HTMLMeterElement|HTMLModElement|HTMLOListElement|HTMLObjectElement|HTMLOptGroupElement|HTMLOptionElement\n |HTMLOptionsCollection|HTMLOutputElement|HTMLParagraphElement|HTMLParamElement|HTMLPreElement|HTMLProgressElement\n |HTMLQuoteElement|HTMLScriptElement|HTMLSelectElement|HTMLShadowElement|HTMLSourceElement|HTMLSpanElement|HTMLStyleElement\n |HTMLTableCaptionElement|HTMLTableCellElement|HTMLTableColElement|HTMLTableDataCellElement|HTMLTableElement|HTMLTableHeaderCellElement\n |HTMLTableRowElement|HTMLTableSectionElement|HTMLTextAreaElement|HTMLTimeElement|HTMLTitleElement|HTMLTrackElement\n |HTMLUListElement|HTMLUnknownElement|HTMLVideoElement|HashChangeEvent|History|IDBCursor|IDBCursorWithValue|IDBDatabase\n |IDBEnvironment|IDBFactory|IDBIndex|IDBKeyRange|IDBMutableFile|IDBObjectStore|IDBOpenDBRequest|IDBRequest|IDBTransaction\n |IDBVersionChangeEvent|IIRFilterNode|IdentityManager|ImageBitmap|ImageBitmapFactories|ImageData|Index|InputDeviceCapabilities\n |InputEvent|InstallEvent|InstallTrigger|KeyboardEvent|LinkStyle|LocalFileSystem|LocalFileSystemSync|Location|MIDIAccess\n |MIDIConnectionEvent|MIDIInput|MIDIInputMap|MIDIOutputMap|MediaElementAudioSourceNode|MediaError|MediaKeyMessageEvent\n |MediaKeySession|MediaKeyStatusMap|MediaKeySystemAccess|MediaKeySystemConfiguration|MediaKeys|MediaRecorder|MediaStream\n |MediaStreamAudioDestinationNode|MediaStreamAudioSourceNode|MessageChannel|MessageEvent|MessagePort|MouseEvent\n |MutationObserver|MutationRecord|NamedNodeMap|Navigator|NavigatorConcurrentHardware|NavigatorGeolocation|NavigatorID\n |NavigatorLanguage|NavigatorOnLine|Node|NodeFilter|NodeIterator|NodeList|NonDocumentTypeChildNode|Notification\n |OfflineAudioCompletionEvent|OfflineAudioContext|OscillatorNode|PageTransitionEvent|PannerNode|ParentNode|PasswordCredential\n |Path2D|PaymentAddress|PaymentRequest|PaymentResponse|Performance|PerformanceEntry|PerformanceFrameTiming|PerformanceMark\n |PerformanceMeasure|PerformanceNavigation|PerformanceNavigationTiming|PerformanceObserver|PerformanceObserverEntryList\n |PerformanceResourceTiming|PerformanceTiming|PeriodicSyncEvent|PeriodicWave|Plugin|Point|PointerEvent|PopStateEvent\n |PortCollection|Position|PositionError|PositionOptions|PresentationConnectionClosedEvent|PresentationConnectionList\n |PresentationReceiver|ProcessingInstruction|ProgressEvent|PromiseRejectionEvent|PushEvent|PushRegistrationManager\n |RTCCertificate|RTCConfiguration|RTCPeerConnection|RTCSessionDescriptionCallback|RTCStatsReport|RadioNodeList|RandomSource\n |Range|ReadableByteStream|RenderingContext|SVGAElement|SVGAngle|SVGAnimateColorElement|SVGAnimateElement|SVGAnimateMotionElement\n |SVGAnimateTransformElement|SVGAnimatedAngle|SVGAnimatedBoolean|SVGAnimatedEnumeration|SVGAnimatedInteger|SVGAnimatedLength\n |SVGAnimatedLengthList|SVGAnimatedNumber|SVGAnimatedNumberList|SVGAnimatedPoints|SVGAnimatedPreserveAspectRatio\n |SVGAnimatedRect|SVGAnimatedString|SVGAnimatedTransformList|SVGAnimationElement|SVGCircleElement|SVGClipPathElement\n |SVGCursorElement|SVGDefsElement|SVGDescElement|SVGElement|SVGEllipseElement|SVGEvent|SVGFilterElement|SVGFontElement\n |SVGFontFaceElement|SVGFontFaceFormatElement|SVGFontFaceNameElement|SVGFontFaceSrcElement|SVGFontFaceUriElement\n |SVGForeignObjectElement|SVGGElement|SVGGlyphElement|SVGGradientElement|SVGHKernElement|SVGImageElement|SVGLength\n |SVGLengthList|SVGLineElement|SVGLinearGradientElement|SVGMPathElement|SVGMaskElement|SVGMatrix|SVGMissingGlyphElement\n |SVGNumber|SVGNumberList|SVGPathElement|SVGPatternElement|SVGPoint|SVGPolygonElement|SVGPolylineElement|SVGPreserveAspectRatio\n |SVGRadialGradientElement|SVGRect|SVGRectElement|SVGSVGElement|SVGScriptElement|SVGSetElement|SVGStopElement|SVGStringList\n |SVGStylable|SVGStyleElement|SVGSwitchElement|SVGSymbolElement|SVGTRefElement|SVGTSpanElement|SVGTests|SVGTextElement\n |SVGTextPositioningElement|SVGTitleElement|SVGTransform|SVGTransformList|SVGTransformable|SVGUseElement|SVGVKernElement\n |SVGViewElement|ServiceWorker|ServiceWorkerContainer|ServiceWorkerGlobalScope|ServiceWorkerRegistration|ServiceWorkerState\n |ShadowRoot|SharedWorker|SharedWorkerGlobalScope|SourceBufferList|StereoPannerNode|Storage|StorageEvent|StyleSheet\n |StyleSheetList|SubtleCrypto|SyncEvent|Text|TextMetrics|TimeEvent|TimeRanges|Touch|TouchEvent|TouchList|Transferable\n |TreeWalker|UIEvent|USVString|VRDisplayCapabilities|ValidityState|WaveShaperNode|WebGL|WebGLActiveInfo|WebGLBuffer\n |WebGLContextEvent|WebGLFramebuffer|WebGLProgram|WebGLRenderbuffer|WebGLRenderingContext|WebGLShader|WebGLShaderPrecisionFormat\n |WebGLTexture|WebGLTimerQueryEXT|WebGLTransformFeedback|WebGLUniformLocation|WebGLVertexArrayObject|WebGLVertexArrayObjectOES\n |WebSocket|WebSockets|WebVTT|WheelEvent|Window|WindowBase64|WindowEventHandlers|WindowTimers|Worker|WorkerGlobalScope\n |WorkerLocation|WorkerNavigator|XMLHttpRequest|XMLHttpRequestEventTarget|XMLSerializer|XPathExpression|XPathResult\n |XSLTProcessor))\\b(?!\\$)",
2146 "captures": {
2147 "1": {
2148 "name": "support.variable.dom.tsx"
2149 },
2150 "2": {
2151 "name": "support.class.dom.tsx"
2152 }
2153 }
2154 },
2155 {
2156 "match": "(?x) (\\.) \\s* (?:\n (ATTRIBUTE_NODE|CDATA_SECTION_NODE|COMMENT_NODE|DOCUMENT_FRAGMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE\n |DOMSTRING_SIZE_ERR|ELEMENT_NODE|ENTITY_NODE|ENTITY_REFERENCE_NODE|HIERARCHY_REQUEST_ERR|INDEX_SIZE_ERR\n |INUSE_ATTRIBUTE_ERR|INVALID_CHARACTER_ERR|NO_DATA_ALLOWED_ERR|NO_MODIFICATION_ALLOWED_ERR|NOT_FOUND_ERR\n |NOT_SUPPORTED_ERR|NOTATION_NODE|PROCESSING_INSTRUCTION_NODE|TEXT_NODE|WRONG_DOCUMENT_ERR)\n |\n (_content|[xyz]|abbr|above|accept|acceptCharset|accessKey|action|align|[av]Link(?:color)?|all|alt|anchors|appCodeName\n |appCore|applets|appMinorVersion|appName|appVersion|archive|areas|arguments|attributes|availHeight|availLeft|availTop\n |availWidth|axis|background|backgroundColor|backgroundImage|below|bgColor|body|border|borderBottomWidth|borderColor\n |borderLeftWidth|borderRightWidth|borderStyle|borderTopWidth|borderWidth|bottom|bufferDepth|callee|caller|caption\n |cellPadding|cells|cellSpacing|ch|characterSet|charset|checked|childNodes|chOff|cite|classes|className|clear\n |clientInformation|clip|clipBoardData|closed|code|codeBase|codeType|color|colorDepth|cols|colSpan|compact|complete\n |components|content|controllers|cookie|cookieEnabled|cords|cpuClass|crypto|current|data|dateTime|declare|defaultCharset\n |defaultChecked|defaultSelected|defaultStatus|defaultValue|defaultView|defer|description|dialogArguments|dialogHeight\n |dialogLeft|dialogTop|dialogWidth|dir|directories|disabled|display|docmain|doctype|documentElement|elements|embeds\n |enabledPlugin|encoding|enctype|entities|event|expando|external|face|fgColor|filename|firstChild|fontFamily|fontSize\n |fontWeight|form|formName|forms|frame|frameBorder|frameElement|frames|hasFocus|hash|headers|height|history|host\n |hostname|href|hreflang|hspace|htmlFor|httpEquiv|id|ids|ignoreCase|images|implementation|index|innerHeight|innerWidth\n |input|isMap|label|lang|language|lastChild|lastIndex|lastMatch|lastModified|lastParen|layer[sXY]|left|leftContext\n |lineHeight|link|linkColor|links|listStyleType|localName|location|locationbar|longDesc|lowsrc|lowSrc|marginBottom\n |marginHeight|marginLeft|marginRight|marginTop|marginWidth|maxLength|media|menubar|method|mimeTypes|multiline|multiple\n |name|nameProp|namespaces|namespaceURI|next|nextSibling|nodeName|nodeType|nodeValue|noHref|noResize|noShade|notationName\n |notations|noWrap|object|offscreenBuffering|onLine|onreadystatechange|opener|opsProfile|options|oscpu|outerHeight\n |outerWidth|ownerDocument|paddingBottom|paddingLeft|paddingRight|paddingTop|page[XY]|page[XY]Offset|parent|parentLayer\n |parentNode|parentWindow|pathname|personalbar|pixelDepth|pkcs11|platform|plugins|port|prefix|previous|previousDibling\n |product|productSub|profile|profileend|prompt|prompter|protocol|publicId|readOnly|readyState|referrer|rel|responseText\n |responseXML|rev|right|rightContext|rowIndex|rows|rowSpan|rules|scheme|scope|screen[XY]|screenLeft|screenTop|scripts\n |scrollbars|scrolling|sectionRowIndex|security|securityPolicy|selected|selectedIndex|selection|self|shape|siblingAbove\n |siblingBelow|size|source|specified|standby|start|status|statusbar|statusText|style|styleSheets|suffixes|summary\n |systemId|systemLanguage|tagName|tags|target|tBodies|text|textAlign|textDecoration|textIndent|textTransform|tFoot|tHead\n |title|toolbar|top|type|undefined|uniqueID|updateInterval|URL|URLUnencoded|useMap|userAgent|userLanguage|userProfile\n |vAlign|value|valueType|vendor|vendorSub|version|visibility|vspace|whiteSpace|width|X[MS]LDocument|zIndex))\\b(?!\\$|\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2157 "captures": {
2158 "1": {
2159 "name": "punctuation.accessor.tsx"
2160 },
2161 "2": {
2162 "name": "support.constant.dom.tsx"
2163 },
2164 "3": {
2165 "name": "support.variable.property.dom.tsx"
2166 }
2167 }
2168 },
2169 {
2170 "name": "support.class.node.tsx",
2171 "match": "(?x)(?<!\\.|\\$)\\b(Buffer|EventEmitter|Server|Pipe|Socket|REPLServer|ReadStream|WriteStream|Stream\n |Inflate|Deflate|InflateRaw|DeflateRaw|GZip|GUnzip|Unzip|Zip)\\b(?!\\$)"
2172 },
2173 {
2174 "name": "support.module.node.tsx",
2175 "match": "(?x)(?<!\\.|\\$)\\b(assert|buffer|child_process|cluster|constants|crypto|dgram|dns|domain|events|fs|http|https|net\n |os|path|punycode|querystring|readline|repl|stream|string_decoder|timers|tls|tty|url|util|vm|zlib)\\b(?!\\$)"
2176 },
2177 {
2178 "match": "(?x)(?<!\\.|\\$)\\b(process)(?:(\\.)(?:\n (arch|argv|config|connected|env|execArgv|execPath|exitCode|mainModule|pid|platform|release|stderr|stdin|stdout|title|version|versions)\n |\n (abort|chdir|cwd|disconnect|exit|[sg]ete?[gu]id|send|[sg]etgroups|initgroups|kill|memoryUsage|nextTick|umask|uptime|hrtime)\n))?\\b(?!\\$)",
2179 "captures": {
2180 "1": {
2181 "name": "support.variable.object.process.tsx"
2182 },
2183 "2": {
2184 "name": "punctuation.accessor.tsx"
2185 },
2186 "3": {
2187 "name": "support.variable.property.process.tsx"
2188 },
2189 "4": {
2190 "name": "support.function.process.tsx"
2191 }
2192 }
2193 },
2194 {
2195 "match": "(?<!\\.|\\$)\\b(?:(exports)|(module)(?:(\\.)(exports|id|filename|loaded|parent|children))?)\\b(?!\\$)",
2196 "captures": {
2197 "1": {
2198 "name": "support.type.object.module.tsx"
2199 },
2200 "2": {
2201 "name": "support.type.object.module.tsx"
2202 },
2203 "3": {
2204 "name": "punctuation.accessor.tsx"
2205 },
2206 "4": {
2207 "name": "support.type.object.module.tsx"
2208 }
2209 }
2210 },
2211 {
2212 "name": "support.variable.object.node.tsx",
2213 "match": "(?<!\\.|\\$)\\b(global|GLOBAL|root|__dirname|__filename)\\b(?!\\$)"
2214 },
2215 {
2216 "match": "(?x) (\\.) \\s* \n(?:\n (on(?:Rowsinserted|Rowsdelete|Rowenter|Rowexit|Resize|Resizestart|Resizeend|Reset|\n Readystatechange|Mouseout|Mouseover|Mousedown|Mouseup|Mousemove|\n Before(?:cut|deactivate|unload|update|paste|print|editfocus|activate)|\n Blur|Scrolltop|Submit|Select|Selectstart|Selectionchange|Hover|Help|\n Change|Contextmenu|Controlselect|Cut|Cellchange|Clock|Close|Deactivate|\n Datasetchanged|Datasetcomplete|Dataavailable|Drop|Drag|Dragstart|Dragover|\n Dragdrop|Dragenter|Dragend|Dragleave|Dblclick|Unload|Paste|Propertychange|Error|\n Errorupdate|Keydown|Keyup|Keypress|Focus|Load|Activate|Afterupdate|Afterprint|Abort)\n ) |\n (shift|showModelessDialog|showModalDialog|showHelp|scroll|scrollX|scrollByPages|\n scrollByLines|scrollY|scrollTo|stop|strike|sizeToContent|sidebar|signText|sort|\n sup|sub|substr|substring|splice|split|send|set(?:Milliseconds|Seconds|Minutes|Hours|\n Month|Year|FullYear|Date|UTC(?:Milliseconds|Seconds|Minutes|Hours|Month|FullYear|Date)|\n Time|Hotkeys|Cursor|ZOptions|Active|Resizable|RequestHeader)|search|slice|\n savePreferences|small|home|handleEvent|navigate|char|charCodeAt|charAt|concat|\n contextual|confirm|compile|clear|captureEvents|call|createStyleSheet|createPopup|\n createEventObject|to(?:GMTString|UTCString|String|Source|UpperCase|LowerCase|LocaleString)|\n test|taint|taintEnabled|indexOf|italics|disableExternalCapture|dump|detachEvent|unshift|\n untaint|unwatch|updateCommands|join|javaEnabled|pop|push|plugins.refresh|paddings|parse|\n print|prompt|preference|enableExternalCapture|exec|execScript|valueOf|UTC|find|file|\n fileModifiedDate|fileSize|fileCreatedDate|fileUpdatedDate|fixed|fontsize|fontcolor|\n forward|fromCharCode|watch|link|load|lastIndexOf|anchor|attachEvent|atob|apply|alert|\n abort|routeEvents|resize|resizeBy|resizeTo|recalc|returnValue|replace|reverse|reload|\n releaseCapture|releaseEvents|go|get(?:Milliseconds|Seconds|Minutes|Hours|Month|Day|Year|FullYear|\n Time|Date|TimezoneOffset|UTC(?:Milliseconds|Seconds|Minutes|Hours|Day|Month|FullYear|Date)|\n Attention|Selection|ResponseHeader|AllResponseHeaders)|moveBy|moveBelow|moveTo|\n moveToAbsolute|moveAbove|mergeAttributes|match|margins|btoa|big|bold|borderWidths|blink|back\n ) |\n (acceptNode|add|addEventListener|addTextTrack|adoptNode|after|animate|append|\n appendChild|appendData|before|blur|canPlayType|captureStream|\n caretPositionFromPoint|caretRangeFromPoint|checkValidity|clear|click|\n cloneContents|cloneNode|cloneRange|close|closest|collapse|\n compareBoundaryPoints|compareDocumentPosition|comparePoint|contains|\n convertPointFromNode|convertQuadFromNode|convertRectFromNode|createAttribute|\n createAttributeNS|createCaption|createCDATASection|createComment|\n createContextualFragment|createDocument|createDocumentFragment|\n createDocumentType|createElement|createElementNS|createEntityReference|\n createEvent|createExpression|createHTMLDocument|createNodeIterator|\n createNSResolver|createProcessingInstruction|createRange|createShadowRoot|\n createTBody|createTextNode|createTFoot|createTHead|createTreeWalker|delete|\n deleteCaption|deleteCell|deleteContents|deleteData|deleteRow|deleteTFoot|\n deleteTHead|detach|disconnect|dispatchEvent|elementFromPoint|elementsFromPoint|\n enableStyleSheetsForSet|entries|evaluate|execCommand|exitFullscreen|\n exitPointerLock|expand|extractContents|fastSeek|firstChild|focus|forEach|get|\n getAll|getAnimations|getAttribute|getAttributeNames|getAttributeNode|\n getAttributeNodeNS|getAttributeNS|getBoundingClientRect|getBoxQuads|\n getClientRects|getContext|getDestinationInsertionPoints|getElementById|\n getElementsByClassName|getElementsByName|getElementsByTagName|\n getElementsByTagNameNS|getItem|getNamedItem|getSelection|getStartDate|\n getVideoPlaybackQuality|has|hasAttribute|hasAttributeNS|hasAttributes|\n hasChildNodes|hasFeature|hasFocus|importNode|initEvent|insertAdjacentElement|\n insertAdjacentHTML|insertAdjacentText|insertBefore|insertCell|insertData|\n insertNode|insertRow|intersectsNode|isDefaultNamespace|isEqualNode|\n isPointInRange|isSameNode|item|key|keys|lastChild|load|lookupNamespaceURI|\n lookupPrefix|matches|move|moveAttribute|moveAttributeNode|moveChild|\n moveNamedItem|namedItem|nextNode|nextSibling|normalize|observe|open|\n parentNode|pause|play|postMessage|prepend|preventDefault|previousNode|\n previousSibling|probablySupportsContext|queryCommandEnabled|\n queryCommandIndeterm|queryCommandState|queryCommandSupported|queryCommandValue|\n querySelector|querySelectorAll|registerContentHandler|registerElement|\n registerProtocolHandler|releaseCapture|releaseEvents|remove|removeAttribute|\n removeAttributeNode|removeAttributeNS|removeChild|removeEventListener|\n removeItem|replace|replaceChild|replaceData|replaceWith|reportValidity|\n requestFullscreen|requestPointerLock|reset|scroll|scrollBy|scrollIntoView|\n scrollTo|seekToNextFrame|select|selectNode|selectNodeContents|set|setAttribute|\n setAttributeNode|setAttributeNodeNS|setAttributeNS|setCapture|\n setCustomValidity|setEnd|setEndAfter|setEndBefore|setItem|setNamedItem|\n setRangeText|setSelectionRange|setSinkId|setStart|setStartAfter|setStartBefore|\n slice|splitText|stepDown|stepUp|stopImmediatePropagation|stopPropagation|\n submit|substringData|supports|surroundContents|takeRecords|terminate|toBlob|\n toDataURL|toggle|toString|values|write|writeln\n )\n)(?=\\s*\\()",
2217 "captures": {
2218 "1": {
2219 "name": "punctuation.accessor.tsx"
2220 },
2221 "2": {
2222 "name": "support.function.event-handler.tsx"
2223 },
2224 "3": {
2225 "name": "support.function.tsx"
2226 },
2227 "4": {
2228 "name": "support.function.dom.tsx"
2229 }
2230 }
2231 }
2232 ]
2233 },
2234 "function-call": {
2235 "begin": "(?=(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2236 "end": "(?<=\\))(?!(\\.\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\()",
2237 "patterns": [
2238 {
2239 "include": "#support-objects"
2240 },
2241 {
2242 "name": "punctuation.accessor.tsx",
2243 "match": "\\."
2244 },
2245 {
2246 "name": "entity.name.function.tsx",
2247 "match": "([_$[:alpha:]][_$[:alnum:]]*)"
2248 },
2249 {
2250 "include": "#comment"
2251 },
2252 {
2253 "name": "meta.type.parameters.tsx",
2254 "begin": "\\<",
2255 "beginCaptures": {
2256 "0": {
2257 "name": "punctuation.definition.typeparameters.begin.tsx"
2258 }
2259 },
2260 "end": "\\>",
2261 "endCaptures": {
2262 "0": {
2263 "name": "punctuation.definition.typeparameters.end.tsx"
2264 }
2265 },
2266 "patterns": [
2267 {
2268 "include": "#type"
2269 },
2270 {
2271 "include": "#punctuation-comma"
2272 }
2273 ]
2274 },
2275 {
2276 "include": "#paren-expression"
2277 }
2278 ]
2279 },
2280 "identifiers": {
2281 "patterns": [
2282 {
2283 "name": "support.class.tsx",
2284 "match": "([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*\\.\\s*prototype\\b(?!\\$))"
2285 },
2286 {
2287 "match": "(?x)(\\.)\\s*(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
2288 "captures": {
2289 "1": {
2290 "name": "punctuation.accessor.tsx"
2291 },
2292 "2": {
2293 "name": "constant.other.object.property.tsx"
2294 },
2295 "3": {
2296 "name": "variable.other.object.property.tsx"
2297 }
2298 }
2299 },
2300 {
2301 "match": "(?x)(?:(\\.)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)(?=\\s*=\\s*( (async\\s+)|(function\\s*[(<])|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)))",
2302 "captures": {
2303 "1": {
2304 "name": "punctuation.accessor.tsx"
2305 },
2306 "2": {
2307 "name": "entity.name.function.tsx"
2308 }
2309 }
2310 },
2311 {
2312 "match": "(\\.)\\s*([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])",
2313 "captures": {
2314 "1": {
2315 "name": "punctuation.accessor.tsx"
2316 },
2317 "2": {
2318 "name": "constant.other.property.tsx"
2319 }
2320 }
2321 },
2322 {
2323 "match": "(\\.)\\s*([_$[:alpha:]][_$[:alnum:]]*)",
2324 "captures": {
2325 "1": {
2326 "name": "punctuation.accessor.tsx"
2327 },
2328 "2": {
2329 "name": "variable.other.property.tsx"
2330 }
2331 }
2332 },
2333 {
2334 "match": "(?x)(?:\n ([[:upper:]][_$[:digit:][:upper:]]*) |\n ([_$[:alpha:]][_$[:alnum:]]*)\n)(?=\\s*\\.\\s*[_$[:alpha:]][_$[:alnum:]]*)",
2335 "captures": {
2336 "1": {
2337 "name": "constant.other.object.tsx"
2338 },
2339 "2": {
2340 "name": "variable.other.object.tsx"
2341 }
2342 }
2343 },
2344 {
2345 "name": "constant.other.tsx",
2346 "match": "([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])"
2347 },
2348 {
2349 "name": "variable.other.readwrite.tsx",
2350 "match": "[_$[:alpha:]][_$[:alnum:]]*"
2351 }
2352 ]
2353 },
2354 "cast": {
2355 "patterns": [
2356 {
2357 "include": "#jsx"
2358 }
2359 ]
2360 },
2361 "new-expr": {
2362 "name": "new.expr.tsx",
2363 "begin": "(?<!\\.|\\$)\\b(new)\\b(?!\\$)",
2364 "beginCaptures": {
2365 "1": {
2366 "name": "keyword.operator.new.tsx"
2367 }
2368 },
2369 "end": "(?<=\\))|(?=[;),]|$|((?<!\\.|\\$)\\bnew\\b(?!\\$)))",
2370 "patterns": [
2371 {
2372 "include": "#paren-expression"
2373 },
2374 {
2375 "include": "#class-or-interface-declaration"
2376 },
2377 {
2378 "include": "#type"
2379 }
2380 ]
2381 },
2382 "object-member": {
2383 "patterns": [
2384 {
2385 "include": "#comment"
2386 },
2387 {
2388 "include": "#method-declaration"
2389 },
2390 {
2391 "name": "meta.object.member.tsx",
2392 "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*:)",
2393 "end": "(?=,|\\})",
2394 "patterns": [
2395 {
2396 "name": "meta.object-literal.key.tsx",
2397 "begin": "(?=(?:(?:\\'[^']*\\')|(?:\\\"[^\"]*\\\")|(?:\\[([^\\[\\]]|\\[[^\\[\\]]+\\])+\\]))\\s*:)",
2398 "end": ":",
2399 "endCaptures": {
2400 "0": {
2401 "name": "punctuation.separator.key-value.tsx"
2402 }
2403 },
2404 "patterns": [
2405 {
2406 "include": "#string"
2407 },
2408 {
2409 "include": "#array-literal"
2410 }
2411 ]
2412 },
2413 {
2414 "include": "#expression"
2415 }
2416 ]
2417 },
2418 {
2419 "name": "meta.object.member.tsx",
2420 "begin": "(?x)(?:([_$[:alpha:]][_$[:alnum:]]*)\\s*(:)(?=\\s*( (async\\s+)|(function\\s*[(<])|(function\\s+)| ([_$[:alpha:]][_$[:alnum:]]*\\s*=>)| ((<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>))))",
2421 "beginCaptures": {
2422 "0": {
2423 "name": "meta.object-literal.key.tsx"
2424 },
2425 "1": {
2426 "name": "entity.name.function.tsx"
2427 },
2428 "2": {
2429 "name": "punctuation.separator.key-value.tsx"
2430 }
2431 },
2432 "end": "(?=,|\\})",
2433 "patterns": [
2434 {
2435 "include": "#expression"
2436 }
2437 ]
2438 },
2439 {
2440 "name": "meta.object.member.tsx",
2441 "begin": "(?:[_$[:alpha:]][_$[:alnum:]]*)\\s*(:)",
2442 "beginCaptures": {
2443 "0": {
2444 "name": "meta.object-literal.key.tsx"
2445 },
2446 "1": {
2447 "name": "punctuation.separator.key-value.tsx"
2448 }
2449 },
2450 "end": "(?=,|\\})",
2451 "patterns": [
2452 {
2453 "include": "#expression"
2454 }
2455 ]
2456 },
2457 {
2458 "name": "meta.object.member.tsx",
2459 "begin": "\\.\\.\\.",
2460 "beginCaptures": {
2461 "0": {
2462 "name": "keyword.operator.spread.tsx"
2463 }
2464 },
2465 "end": "(?=,|\\})",
2466 "patterns": [
2467 {
2468 "include": "#expression"
2469 }
2470 ]
2471 },
2472 {
2473 "name": "meta.object.member.tsx",
2474 "match": "([_$[:alpha:]][_$[:alnum:]]*)\\s*(?=,|\\}|$)",
2475 "captures": {
2476 "1": {
2477 "name": "variable.other.readwrite.tsx"
2478 }
2479 }
2480 },
2481 {
2482 "include": "#punctuation-comma"
2483 }
2484 ]
2485 },
2486 "expression-operators": {
2487 "patterns": [
2488 {
2489 "name": "keyword.control.flow.tsx",
2490 "match": "(?<!\\.|\\$)\\b(await)\\b(?!\\$)"
2491 },
2492 {
2493 "name": "keyword.operator.expression.delete.tsx",
2494 "match": "(?<!\\.|\\$)\\bdelete\\b(?!\\$)"
2495 },
2496 {
2497 "name": "keyword.operator.expression.in.tsx",
2498 "match": "(?<!\\.|\\$)\\bin\\b(?!\\$)"
2499 },
2500 {
2501 "name": "keyword.operator.expression.of.tsx",
2502 "match": "(?<!\\.|\\$)\\bof\\b(?!\\$)"
2503 },
2504 {
2505 "name": "keyword.operator.expression.instanceof.tsx",
2506 "match": "(?<!\\.|\\$)\\binstanceof\\b(?!\\$)"
2507 },
2508 {
2509 "name": "keyword.operator.new.tsx",
2510 "match": "(?<!\\.|\\$)\\bnew\\b(?!\\$)"
2511 },
2512 {
2513 "include": "#typeof-operator"
2514 },
2515 {
2516 "name": "keyword.operator.expression.void.tsx",
2517 "match": "(?<!\\.|\\$)\\bvoid\\b(?!\\$)"
2518 },
2519 {
2520 "begin": "(?<!\\.|\\$)\\bas\\b(?!\\$)",
2521 "beginCaptures": {
2522 "0": {
2523 "name": "keyword.control.as.tsx"
2524 }
2525 },
2526 "end": "(?=$|[;,:})\\]])",
2527 "patterns": [
2528 {
2529 "include": "#type"
2530 }
2531 ]
2532 },
2533 {
2534 "name": "keyword.operator.spread.tsx",
2535 "match": "\\.\\.\\."
2536 },
2537 {
2538 "name": "keyword.operator.assignment.compound.tsx",
2539 "match": "\\*=|(?<!\\()/=|%=|\\+=|\\-="
2540 },
2541 {
2542 "name": "keyword.operator.assignment.compound.bitwise.tsx",
2543 "match": "\\&=|\\^=|<<=|>>=|>>>=|\\|="
2544 },
2545 {
2546 "name": "keyword.operator.bitwise.shift.tsx",
2547 "match": "<<|>>>|>>"
2548 },
2549 {
2550 "name": "keyword.operator.comparison.tsx",
2551 "match": "===|!==|==|!="
2552 },
2553 {
2554 "name": "keyword.operator.relational.tsx",
2555 "match": "<=|>=|<>|<|>"
2556 },
2557 {
2558 "name": "keyword.operator.logical.tsx",
2559 "match": "\\!|&&|\\|\\|"
2560 },
2561 {
2562 "name": "keyword.operator.bitwise.tsx",
2563 "match": "\\&|~|\\^|\\|"
2564 },
2565 {
2566 "name": "keyword.operator.assignment.tsx",
2567 "match": "\\="
2568 },
2569 {
2570 "name": "keyword.operator.decrement.tsx",
2571 "match": "--"
2572 },
2573 {
2574 "name": "keyword.operator.increment.tsx",
2575 "match": "\\+\\+"
2576 },
2577 {
2578 "name": "keyword.operator.arithmetic.tsx",
2579 "match": "%|\\*|/|-|\\+"
2580 },
2581 {
2582 "match": "(?<=[_$[:alnum:]])\\s*(/)(?![/*])",
2583 "captures": {
2584 "1": {
2585 "name": "keyword.operator.arithmetic.tsx"
2586 }
2587 }
2588 }
2589 ]
2590 },
2591 "typeof-operator": {
2592 "name": "keyword.operator.expression.typeof.tsx",
2593 "match": "(?<!\\.|\\$)\\btypeof\\b(?!\\$)"
2594 },
2595 "arrow-function": {
2596 "patterns": [
2597 {
2598 "name": "meta.arrow.tsx",
2599 "match": "(?<!\\.|\\$)(\\basync)(?=\\s*[<(])",
2600 "captures": {
2601 "1": {
2602 "name": "storage.modifier.async.tsx"
2603 }
2604 }
2605 },
2606 {
2607 "name": "meta.arrow.tsx",
2608 "match": "(?:(?<!\\.|\\$)(\\basync)\\s*)?([_$[:alpha:]][_$[:alnum:]]*)\\s*(?==>)",
2609 "captures": {
2610 "1": {
2611 "name": "storage.modifier.async.tsx"
2612 },
2613 "2": {
2614 "name": "variable.parameter.tsx"
2615 }
2616 }
2617 },
2618 {
2619 "name": "meta.arrow.tsx",
2620 "begin": "(?x)\\s*(?=(<([^<>]|\\<[^<>]+\\>)+>\\s*)?\\(([^()]|\\([^()]*\\))*\\)(\\s*:\\s*(.)*)?\\s*=>)",
2621 "end": "(?==>)",
2622 "patterns": [
2623 {
2624 "include": "#comment"
2625 },
2626 {
2627 "include": "#type-parameters"
2628 },
2629 {
2630 "include": "#function-parameters"
2631 },
2632 {
2633 "include": "#arrow-return-type"
2634 }
2635 ]
2636 },
2637 {
2638 "name": "meta.arrow.tsx",
2639 "begin": "=>",
2640 "beginCaptures": {
2641 "0": {
2642 "name": "storage.type.function.arrow.tsx"
2643 }
2644 },
2645 "end": "(?<=\\})|((?!\\{)(?=\\S))",
2646 "patterns": [
2647 {
2648 "include": "#decl-block"
2649 },
2650 {
2651 "include": "#expression"
2652 }
2653 ]
2654 }
2655 ]
2656 },
2657 "arrow-return-type": {
2658 "name": "meta.return.type.arrow.tsx",
2659 "begin": "(?<=\\))\\s*(:)",
2660 "beginCaptures": {
2661 "1": {
2662 "name": "keyword.operator.type.annotation.tsx"
2663 }
2664 },
2665 "end": "(?<!:)((?=$)|(?==>|;|//))",
2666 "patterns": [
2667 {
2668 "include": "#type-predicate-operator"
2669 },
2670 {
2671 "include": "#type"
2672 }
2673 ]
2674 },
2675 "punctuation-comma": {
2676 "name": "punctuation.separator.comma.tsx",
2677 "match": ","
2678 },
2679 "punctuation-semicolon": {
2680 "name": "punctuation.terminator.statement.tsx",
2681 "match": ";"
2682 },
2683 "punctuation-accessor": {
2684 "name": "punctuation.accessor.tsx",
2685 "match": "\\."
2686 },
2687 "paren-expression": {
2688 "begin": "\\(",
2689 "beginCaptures": {
2690 "0": {
2691 "name": "meta.brace.round.tsx"
2692 }
2693 },
2694 "end": "\\)",
2695 "endCaptures": {
2696 "0": {
2697 "name": "meta.brace.round.tsx"
2698 }
2699 },
2700 "patterns": [
2701 {
2702 "include": "#expression"
2703 },
2704 {
2705 "include": "#punctuation-comma"
2706 }
2707 ]
2708 },
2709 "qstring-double": {
2710 "name": "string.quoted.double.tsx",
2711 "begin": "\"",
2712 "beginCaptures": {
2713 "0": {
2714 "name": "punctuation.definition.string.begin.tsx"
2715 }
2716 },
2717 "end": "(\")|((?:[^\\\\\\n])$)",
2718 "endCaptures": {
2719 "1": {
2720 "name": "punctuation.definition.string.end.tsx"
2721 },
2722 "2": {
2723 "name": "invalid.illegal.newline.tsx"
2724 }
2725 },
2726 "patterns": [
2727 {
2728 "include": "#string-character-escape"
2729 }
2730 ]
2731 },
2732 "qstring-single": {
2733 "name": "string.quoted.single.tsx",
2734 "begin": "'",
2735 "beginCaptures": {
2736 "0": {
2737 "name": "punctuation.definition.string.begin.tsx"
2738 }
2739 },
2740 "end": "(\\')|((?:[^\\\\\\n])$)",
2741 "endCaptures": {
2742 "1": {
2743 "name": "punctuation.definition.string.end.tsx"
2744 },
2745 "2": {
2746 "name": "invalid.illegal.newline.tsx"
2747 }
2748 },
2749 "patterns": [
2750 {
2751 "include": "#string-character-escape"
2752 }
2753 ]
2754 },
2755 "regex": {
2756 "patterns": [
2757 {
2758 "name": "string.regex.tsx",
2759 "begin": "(?<=[=(:,\\[?+!]|return|case|=>|&&|\\|\\||\\*\\/)\\s*(/)(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2760 "beginCaptures": {
2761 "1": {
2762 "name": "punctuation.definition.string.begin.tsx"
2763 }
2764 },
2765 "end": "(/)([gimuy]*)",
2766 "endCaptures": {
2767 "1": {
2768 "name": "punctuation.definition.string.end.tsx"
2769 },
2770 "2": {
2771 "name": "keyword.other.tsx"
2772 }
2773 },
2774 "patterns": [
2775 {
2776 "include": "#regexp"
2777 }
2778 ]
2779 },
2780 {
2781 "name": "string.regex.tsx",
2782 "begin": "/(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))",
2783 "beginCaptures": {
2784 "0": {
2785 "name": "punctuation.definition.string.begin.tsx"
2786 }
2787 },
2788 "end": "(/)([gimuy]*)",
2789 "endCaptures": {
2790 "1": {
2791 "name": "punctuation.definition.string.end.tsx"
2792 },
2793 "2": {
2794 "name": "keyword.other.tsx"
2795 }
2796 },
2797 "patterns": [
2798 {
2799 "include": "#regexp"
2800 }
2801 ]
2802 }
2803 ]
2804 },
2805 "regexp": {
2806 "patterns": [
2807 {
2808 "name": "keyword.control.anchor.regexp",
2809 "match": "\\\\[bB]|\\^|\\$"
2810 },
2811 {
2812 "name": "keyword.other.back-reference.regexp",
2813 "match": "\\\\[1-9]\\d*"
2814 },
2815 {
2816 "name": "keyword.operator.quantifier.regexp",
2817 "match": "[?+*]|\\{(\\d+,\\d+|\\d+,|,\\d+|\\d+)\\}\\??"
2818 },
2819 {
2820 "name": "keyword.operator.or.regexp",
2821 "match": "\\|"
2822 },
2823 {
2824 "name": "meta.group.assertion.regexp",
2825 "begin": "(\\()((\\?=)|(\\?!))",
2826 "beginCaptures": {
2827 "1": {
2828 "name": "punctuation.definition.group.regexp"
2829 },
2830 "2": {
2831 "name": "punctuation.definition.group.assertion.regexp"
2832 },
2833 "3": {
2834 "name": "meta.assertion.look-ahead.regexp"
2835 },
2836 "4": {
2837 "name": "meta.assertion.negative-look-ahead.regexp"
2838 }
2839 },
2840 "end": "(\\))",
2841 "endCaptures": {
2842 "1": {
2843 "name": "punctuation.definition.group.regexp"
2844 }
2845 },
2846 "patterns": [
2847 {
2848 "include": "#regexp"
2849 }
2850 ]
2851 },
2852 {
2853 "name": "meta.group.regexp",
2854 "begin": "\\((\\?:)?",
2855 "beginCaptures": {
2856 "0": {
2857 "name": "punctuation.definition.group.regexp"
2858 },
2859 "1": {
2860 "name": "punctuation.definition.group.capture.regexp"
2861 }
2862 },
2863 "end": "\\)",
2864 "endCaptures": {
2865 "0": {
2866 "name": "punctuation.definition.group.regexp"
2867 }
2868 },
2869 "patterns": [
2870 {
2871 "include": "#regexp"
2872 }
2873 ]
2874 },
2875 {
2876 "name": "constant.other.character-class.set.regexp",
2877 "begin": "(\\[)(\\^)?",
2878 "beginCaptures": {
2879 "1": {
2880 "name": "punctuation.definition.character-class.regexp"
2881 },
2882 "2": {
2883 "name": "keyword.operator.negation.regexp"
2884 }
2885 },
2886 "end": "(\\])",
2887 "endCaptures": {
2888 "1": {
2889 "name": "punctuation.definition.character-class.regexp"
2890 }
2891 },
2892 "patterns": [
2893 {
2894 "name": "constant.other.character-class.range.regexp",
2895 "match": "(?:.|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))\\-(?:[^\\]\\\\]|(\\\\(?:[0-7]{3}|x\\h\\h|u\\h\\h\\h\\h))|(\\\\c[A-Z])|(\\\\.))",
2896 "captures": {
2897 "1": {
2898 "name": "constant.character.numeric.regexp"
2899 },
2900 "2": {
2901 "name": "constant.character.control.regexp"
2902 },
2903 "3": {
2904 "name": "constant.character.escape.backslash.regexp"
2905 },
2906 "4": {
2907 "name": "constant.character.numeric.regexp"
2908 },
2909 "5": {
2910 "name": "constant.character.control.regexp"
2911 },
2912 "6": {
2913 "name": "constant.character.escape.backslash.regexp"
2914 }
2915 }
2916 },
2917 {
2918 "include": "#regex-character-class"
2919 }
2920 ]
2921 },
2922 {
2923 "include": "#regex-character-class"
2924 }
2925 ]
2926 },
2927 "regex-character-class": {
2928 "patterns": [
2929 {
2930 "name": "constant.other.character-class.regexp",
2931 "match": "\\\\[wWsSdDtrnvf]|\\."
2932 },
2933 {
2934 "name": "constant.character.numeric.regexp",
2935 "match": "\\\\([0-7]{3}|x\\h\\h|u\\h\\h\\h\\h)"
2936 },
2937 {
2938 "name": "constant.character.control.regexp",
2939 "match": "\\\\c[A-Z]"
2940 },
2941 {
2942 "name": "constant.character.escape.backslash.regexp",
2943 "match": "\\\\."
2944 }
2945 ]
2946 },
2947 "string": {
2948 "patterns": [
2949 {
2950 "include": "#qstring-single"
2951 },
2952 {
2953 "include": "#qstring-double"
2954 }
2955 ]
2956 },
2957 "template": {
2958 "name": "string.template.tsx",
2959 "begin": "([_$[:alpha:]][_$[:alnum:]]*)?(`)",
2960 "beginCaptures": {
2961 "1": {
2962 "name": "entity.name.function.tagged-template.tsx"
2963 },
2964 "2": {
2965 "name": "punctuation.definition.string.template.begin.tsx"
2966 }
2967 },
2968 "end": "`",
2969 "endCaptures": {
2970 "0": {
2971 "name": "punctuation.definition.string.template.end.tsx"
2972 }
2973 },
2974 "patterns": [
2975 {
2976 "include": "#template-substitution-element"
2977 },
2978 {
2979 "include": "#string-character-escape"
2980 }
2981 ]
2982 },
2983 "string-character-escape": {
2984 "name": "constant.character.escape.tsx",
2985 "match": "\\\\(x\\h{2}|[0-2][0-7]{0,2}|3[0-6][0-7]?|37[0-7]?|[4-7][0-7]?|.|$)"
2986 },
2987 "template-substitution-element": {
2988 "name": "meta.template.expression.tsx",
2989 "begin": "\\$\\{",
2990 "beginCaptures": {
2991 "0": {
2992 "name": "punctuation.definition.template-expression.begin.tsx"
2993 }
2994 },
2995 "end": "\\}",
2996 "endCaptures": {
2997 "0": {
2998 "name": "punctuation.definition.template-expression.end.tsx"
2999 }
3000 },
3001 "patterns": [
3002 {
3003 "include": "#expression"
3004 }
3005 ]
3006 },
3007 "literal": {
3008 "name": "literal.tsx",
3009 "patterns": [
3010 {
3011 "include": "#numeric-literal"
3012 },
3013 {
3014 "include": "#boolean-literal"
3015 },
3016 {
3017 "include": "#null-literal"
3018 },
3019 {
3020 "include": "#undefined-literal"
3021 },
3022 {
3023 "include": "#numericConstant-literal"
3024 },
3025 {
3026 "include": "#array-literal"
3027 },
3028 {
3029 "include": "#this-literal"
3030 },
3031 {
3032 "include": "#super-literal"
3033 }
3034 ]
3035 },
3036 "array-literal": {
3037 "name": "meta.array.literal.tsx",
3038 "begin": "\\[",
3039 "beginCaptures": {
3040 "0": {
3041 "name": "meta.brace.square.tsx"
3042 }
3043 },
3044 "end": "\\]",
3045 "endCaptures": {
3046 "0": {
3047 "name": "meta.brace.square.tsx"
3048 }
3049 },
3050 "patterns": [
3051 {
3052 "include": "#expression"
3053 },
3054 {
3055 "include": "#punctuation-comma"
3056 }
3057 ]
3058 },
3059 "numeric-literal": {
3060 "patterns": [
3061 {
3062 "name": "constant.numeric.hex.tsx",
3063 "match": "\\b(?<!\\$)0(x|X)[0-9a-fA-F]+\\b(?!\\$)"
3064 },
3065 {
3066 "name": "constant.numeric.binary.tsx",
3067 "match": "\\b(?<!\\$)0(b|B)[01]+\\b(?!\\$)"
3068 },
3069 {
3070 "name": "constant.numeric.octal.tsx",
3071 "match": "\\b(?<!\\$)0(o|O)?[0-7]+\\b(?!\\$)"
3072 },
3073 {
3074 "match": "(?x)\n(?<!\\$)(?:\n (?:\\b[0-9]+(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # 1.1E+3\n (?:\\b[0-9]+(\\.)[eE][+-]?[0-9]+\\b)| # 1.E+3\n (?:\\B(\\.)[0-9]+[eE][+-]?[0-9]+\\b)| # .1E+3\n (?:\\b[0-9]+[eE][+-]?[0-9]+\\b)| # 1E+3\n (?:\\b[0-9]+(\\.)[0-9]+\\b)| # 1.1\n (?:\\b[0-9]+(\\.)\\B)| # 1.\n (?:\\B(\\.)[0-9]+\\b)| # .1\n (?:\\b[0-9]+\\b(?!\\.)) # 1\n)(?!\\$)",
3075 "captures": {
3076 "0": {
3077 "name": "constant.numeric.decimal.tsx"
3078 },
3079 "1": {
3080 "name": "meta.delimiter.decimal.period.tsx"
3081 },
3082 "2": {
3083 "name": "meta.delimiter.decimal.period.tsx"
3084 },
3085 "3": {
3086 "name": "meta.delimiter.decimal.period.tsx"
3087 },
3088 "4": {
3089 "name": "meta.delimiter.decimal.period.tsx"
3090 },
3091 "5": {
3092 "name": "meta.delimiter.decimal.period.tsx"
3093 },
3094 "6": {
3095 "name": "meta.delimiter.decimal.period.tsx"
3096 }
3097 }
3098 }
3099 ]
3100 },
3101 "boolean-literal": {
3102 "patterns": [
3103 {
3104 "name": "constant.language.boolean.true.tsx",
3105 "match": "(?<!\\.|\\$)\\btrue\\b(?!\\$)"
3106 },
3107 {
3108 "name": "constant.language.boolean.false.tsx",
3109 "match": "(?<!\\.|\\$)\\bfalse\\b(?!\\$)"
3110 }
3111 ]
3112 },
3113 "null-literal": {
3114 "name": "constant.language.null.tsx",
3115 "match": "(?<!\\.|\\$)\\bnull\\b(?!\\$)"
3116 },
3117 "this-literal": {
3118 "name": "variable.language.this.tsx",
3119 "match": "(?<!\\.|\\$)\\bthis\\b(?!\\$)"
3120 },
3121 "super-literal": {
3122 "name": "variable.language.super.tsx",
3123 "match": "(?<!\\.|\\$)\\bsuper\\b(?!\\$)"
3124 },
3125 "undefined-literal": {
3126 "name": "constant.language.undefined.tsx",
3127 "match": "(?<!\\.|\\$)\\bundefined\\b(?!\\$)"
3128 },
3129 "numericConstant-literal": {
3130 "patterns": [
3131 {
3132 "name": "constant.language.nan.tsx",
3133 "match": "(?<!\\.|\\$)\\bNaN\\b(?!\\$)"
3134 },
3135 {
3136 "name": "constant.language.infinity.tsx",
3137 "match": "(?<!\\.|\\$)\\bInfinity\\b(?!\\$)"
3138 }
3139 ]
3140 },
3141 "access-modifier": {
3142 "name": "storage.modifier.tsx",
3143 "match": "(?<!\\.|\\$)\\b(abstract|public|protected|private|readonly|static)\\b(?!\\$)"
3144 },
3145 "property-accessor": {
3146 "name": "storage.type.property.tsx",
3147 "match": "(?<!\\.|\\$)\\b(get|set)\\b(?!\\$)"
3148 },
3149 "comment": {
3150 "patterns": [
3151 {
3152 "name": "comment.block.documentation.tsx",
3153 "begin": "/\\*\\*(?!/)",
3154 "beginCaptures": {
3155 "0": {
3156 "name": "punctuation.definition.comment.tsx"
3157 }
3158 },
3159 "end": "\\*/",
3160 "endCaptures": {
3161 "0": {
3162 "name": "punctuation.definition.comment.tsx"
3163 }
3164 },
3165 "patterns": [
3166 {
3167 "include": "#docblock"
3168 }
3169 ]
3170 },
3171 {
3172 "name": "comment.block.tsx",
3173 "begin": "/\\*",
3174 "beginCaptures": {
3175 "0": {
3176 "name": "punctuation.definition.comment.tsx"
3177 }
3178 },
3179 "end": "\\*/",
3180 "endCaptures": {
3181 "0": {
3182 "name": "punctuation.definition.comment.tsx"
3183 }
3184 }
3185 },
3186 {
3187 "begin": "(^[ \\t]+)?(?=//)",
3188 "beginCaptures": {
3189 "1": {
3190 "name": "punctuation.whitespace.comment.leading.tsx"
3191 }
3192 },
3193 "end": "(?=$)",
3194 "patterns": [
3195 {
3196 "name": "comment.line.double-slash.tsx",
3197 "begin": "//",
3198 "beginCaptures": {
3199 "0": {
3200 "name": "punctuation.definition.comment.tsx"
3201 }
3202 },
3203 "end": "(?=$)"
3204 }
3205 ]
3206 }
3207 ]
3208 },
3209 "directives": {
3210 "name": "comment.line.triple-slash.directive.tsx",
3211 "begin": "^(///)\\s*(?=<(reference|amd-dependency|amd-module)(\\s+(path|types|no-default-lib|name)\\s*=\\s*((\\'[^']*\\')|(\\\"[^\"]*\\\")))+\\s*/>\\s*$)",
3212 "beginCaptures": {
3213 "1": {
3214 "name": "punctuation.definition.comment.tsx"
3215 }
3216 },
3217 "end": "(?=$)",
3218 "patterns": [
3219 {
3220 "name": "meta.tag.tsx",
3221 "begin": "(<)(reference|amd-dependency|amd-module)",
3222 "beginCaptures": {
3223 "1": {
3224 "name": "punctuation.definition.tag.directive.tsx"
3225 },
3226 "2": {
3227 "name": "entity.name.tag.directive.tsx"
3228 }
3229 },
3230 "end": "/>",
3231 "endCaptures": {
3232 "0": {
3233 "name": "punctuation.definition.tag.directive.tsx"
3234 }
3235 },
3236 "patterns": [
3237 {
3238 "name": "entity.other.attribute-name.directive.tsx",
3239 "match": "path|types|no-default-lib|name"
3240 },
3241 {
3242 "name": "keyword.operator.assignment.tsx",
3243 "match": "="
3244 },
3245 {
3246 "include": "#string"
3247 }
3248 ]
3249 }
3250 ]
3251 },
3252 "docblock": {
3253 "patterns": [
3254 {
3255 "name": "storage.type.class.jsdoc",
3256 "match": "(?<!\\w)@(abstract|access|alias|arg|argument|async|attribute|augments|author|beta|borrows|bubbes|callback|chainable|class|classdesc|code|config|const|constant|constructor|constructs|copyright|default|defaultvalue|define|deprecated|desc|description|dict|emits|enum|event|example|exports?|extends|extension|extension_for|extensionfor|external|file|fileoverview|final|fires|for|function|global|host|ignore|implements|inherit[Dd]oc|inner|instance|interface|kind|lends|license|listens|main|member|memberof|method|mixex|mixins?|module|name|namespace|nocollapse|nosideeffects|override|overview|package|param|preserve|private|prop|property|protected|public|read[Oo]nly|record|require[ds]|returns?|see|since|static|struct|submodule|summary|template|this|throws|todo|tutorial|type|typedef|unrestricted|uses|var|variation|version|virtual|writeOnce)\\b"
3257 },
3258 {
3259 "match": "(?x)\n(?:(?<=@param)|(?<=@arg)|(?<=@argument)|(?<=@type))\n\\s+\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string[]|number)} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {(string|number[])} type application, a string or an array of numbers\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n (?:\n [\\w$]*\n (?:\\[\\])? # {string[]|number} type application, an array of strings or a number\n ) |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(\n \\[ # [foo] optional parameter\n \\s*\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n (?:\n \\s*\n = # [foo=bar] Default parameter value\n \\s*\n [\\w$\\s]*\n )?\n )\n \\s*\n \\] |\n (?:\n [a-zA-Z_$][\\w$]*\n (?:\n (?:\\[\\])? # Foo[].bar properties within an array\n \\. # Foo.Bar namespaced parameter\n [a-zA-Z_$][\\w$]*\n )*\n )?\n)\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
3260 "captures": {
3261 "0": {
3262 "name": "other.meta.jsdoc"
3263 },
3264 "1": {
3265 "name": "entity.name.type.instance.jsdoc"
3266 },
3267 "2": {
3268 "name": "variable.other.jsdoc"
3269 },
3270 "3": {
3271 "name": "other.description.jsdoc"
3272 }
3273 }
3274 },
3275 {
3276 "match": "(?x)\n({(?:\n \\* | # {*} any type\n \\? | # {?} unknown type\n\n (?: # Check for a prefix\n \\? | # {?string} nullable type\n ! | # {!string} non-nullable type\n \\.{3} # {...string} variable number of parameters\n )?\n\n (?:\n \\( # Opening bracket of multiple types with parenthesis {(string|number)}\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n \\) |\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n (?:\n [\\.|~] # {Foo.bar} namespaced, {string|number} multiple, {Foo~bar} class-specific callback\n [a-zA-Z_$]+\n (?:\n [\\w$]* |\n \\.?<[\\w$]+(?:,\\s+[\\w$]+)*> # {Array<string>} or {Object<string, number>} type application (optional .)\n )\n )*\n )\n # Check for suffix\n (?:\\[\\])? # {string[]} type application, an array of strings\n =? # {string=} optional parameter\n)})\n\\s+\n(?:-\\s+)? # optional hyphen before the description\n((?:(?!\\*\\/).)*) # The type description",
3277 "captures": {
3278 "0": {
3279 "name": "other.meta.jsdoc"
3280 },
3281 "1": {
3282 "name": "entity.name.type.instance.jsdoc"
3283 },
3284 "2": {
3285 "name": "other.description.jsdoc"
3286 }
3287 }
3288 }
3289 ]
3290 },
3291 "jsx-tag-attributes": {
3292 "patterns": [
3293 {
3294 "include": "#jsx-tag-attribute-name"
3295 },
3296 {
3297 "include": "#jsx-tag-attribute-assignment"
3298 },
3299 {
3300 "include": "#jsx-string-double-quoted"
3301 },
3302 {
3303 "include": "#jsx-string-single-quoted"
3304 },
3305 {
3306 "include": "#jsx-evaluated-code"
3307 }
3308 ]
3309 },
3310 "jsx-tag-attribute-name": {
3311 "match": "(?x)\n \\s*\n ([_$a-zA-Z][-$\\w]*)\n (?=\\s|=|/?>|/\\*|//)",
3312 "captures": {
3313 "1": {
3314 "name": "entity.other.attribute-name.tsx"
3315 }
3316 }
3317 },
3318 "jsx-tag-attribute-assignment": {
3319 "name": "keyword.operator.assignment.tsx",
3320 "match": "=(?=\\s*(?:'|\"|{|/\\*|//|\\n))"
3321 },
3322 "jsx-string-double-quoted": {
3323 "name": "string.quoted.double.tsx",
3324 "begin": "\"",
3325 "end": "\"",
3326 "beginCaptures": {
3327 "0": {
3328 "name": "punctuation.definition.string.begin.tsx"
3329 }
3330 },
3331 "endCaptures": {
3332 "0": {
3333 "name": "punctuation.definition.string.end.tsx"
3334 }
3335 },
3336 "patterns": [
3337 {
3338 "include": "#jsx-entities"
3339 }
3340 ]
3341 },
3342 "jsx-string-single-quoted": {
3343 "name": "string.quoted.single.tsx",
3344 "begin": "'",
3345 "end": "'",
3346 "beginCaptures": {
3347 "0": {
3348 "name": "punctuation.definition.string.begin.tsx"
3349 }
3350 },
3351 "endCaptures": {
3352 "0": {
3353 "name": "punctuation.definition.string.end.tsx"
3354 }
3355 },
3356 "patterns": [
3357 {
3358 "include": "#jsx-entities"
3359 }
3360 ]
3361 },
3362 "jsx-entities": {
3363 "patterns": [
3364 {
3365 "name": "constant.character.entity.tsx",
3366 "match": "(&)([a-zA-Z0-9]+|#[0-9]+|#x[0-9a-fA-F]+)(;)",
3367 "captures": {
3368 "1": {
3369 "name": "punctuation.definition.entity.tsx"
3370 },
3371 "3": {
3372 "name": "punctuation.definition.entity.tsx"
3373 }
3374 }
3375 },
3376 {
3377 "name": "invalid.illegal.bad-ampersand.tsx",
3378 "match": "&"
3379 }
3380 ]
3381 },
3382 "jsx-evaluated-code": {
3383 "name": "meta.embedded.expression.tsx",
3384 "begin": "{",
3385 "end": "}",
3386 "beginCaptures": {
3387 "0": {
3388 "name": "punctuation.section.embedded.begin.tsx"
3389 }
3390 },
3391 "endCaptures": {
3392 "0": {
3393 "name": "punctuation.section.embedded.end.tsx"
3394 }
3395 },
3396 "patterns": [
3397 {
3398 "include": "#expression"
3399 }
3400 ]
3401 },
3402 "jsx-tag-attributes-illegal": {
3403 "name": "invalid.illegal.attribute.tsx",
3404 "match": "\\S+"
3405 },
3406 "jsx-tag-without-attributes": {
3407 "name": "meta.tag.without-attributes.tsx",
3408 "begin": "(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)",
3409 "end": "(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)",
3410 "beginCaptures": {
3411 "1": {
3412 "name": "punctuation.definition.tag.begin.tsx"
3413 },
3414 "2": {
3415 "name": "entity.name.tag.tsx"
3416 },
3417 "3": {
3418 "name": "punctuation.definition.tag.end.tsx"
3419 }
3420 },
3421 "endCaptures": {
3422 "1": {
3423 "name": "punctuation.definition.tag.begin.tsx"
3424 },
3425 "2": {
3426 "name": "entity.name.tag.tsx"
3427 },
3428 "3": {
3429 "name": "punctuation.definition.tag.end.tsx"
3430 }
3431 },
3432 "contentName": "meta.jsx.children.tsx",
3433 "patterns": [
3434 {
3435 "include": "#jsx-children"
3436 }
3437 ]
3438 },
3439 "jsx-tag-in-expression": {
3440 "begin": "(?x)\n (?<=[({\\[,?=>]|&&|\\|\\||\\?|\\Wreturn|^return|\\Wdefault|^)\\s*\n (?!(<)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)) #look ahead is not start of tag without attributes\n (?!<\\s*[_$[:alpha:]][_$[:alnum:]]*((\\s+extends\\s+[^=>])|,)) # look ahead is not type parameter of arrow\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3441 "end": "(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>))",
3442 "endCaptures": {
3443 "0": {
3444 "name": "meta.tag.tsx"
3445 },
3446 "1": {
3447 "name": "punctuation.definition.tag.end.tsx"
3448 },
3449 "2": {
3450 "name": "punctuation.definition.tag.begin.tsx"
3451 },
3452 "3": {
3453 "name": "entity.name.tag.tsx"
3454 },
3455 "4": {
3456 "name": "punctuation.definition.tag.end.tsx"
3457 }
3458 },
3459 "patterns": [
3460 {
3461 "include": "#jsx-tag"
3462 }
3463 ]
3464 },
3465 "jsx-child-tag": {
3466 "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3467 "end": "(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>))",
3468 "endCaptures": {
3469 "0": {
3470 "name": "meta.tag.tsx"
3471 },
3472 "1": {
3473 "name": "punctuation.definition.tag.end.tsx"
3474 },
3475 "2": {
3476 "name": "punctuation.definition.tag.begin.tsx"
3477 },
3478 "3": {
3479 "name": "entity.name.tag.tsx"
3480 },
3481 "4": {
3482 "name": "punctuation.definition.tag.end.tsx"
3483 }
3484 },
3485 "patterns": [
3486 {
3487 "include": "#jsx-tag"
3488 }
3489 ]
3490 },
3491 "jsx-tag": {
3492 "name": "meta.tag.tsx",
3493 "begin": "(?x)\n (?=(<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>))",
3494 "end": "(?=(/>)|(?:(</)\\s*([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\\s*(>)))",
3495 "patterns": [
3496 {
3497 "begin": "(?x)\n (<)\\s*\n ([_$a-zA-Z][-$\\w.]*(?<!\\.|-))\n (?=\\s+(?!\\?)|/?>)",
3498 "beginCaptures": {
3499 "1": {
3500 "name": "punctuation.definition.tag.begin.tsx"
3501 },
3502 "2": {
3503 "name": "entity.name.tag.tsx"
3504 }
3505 },
3506 "end": "(?=[/]?>)",
3507 "patterns": [
3508 {
3509 "include": "#comment"
3510 },
3511 {
3512 "include": "#jsx-tag-attributes"
3513 },
3514 {
3515 "include": "#jsx-tag-attributes-illegal"
3516 }
3517 ]
3518 },
3519 {
3520 "begin": "(>)",
3521 "beginCaptures": {
3522 "1": {
3523 "name": "punctuation.definition.tag.end.tsx"
3524 }
3525 },
3526 "end": "(?=</)",
3527 "contentName": "meta.jsx.children.tsx",
3528 "patterns": [
3529 {
3530 "include": "#jsx-children"
3531 }
3532 ]
3533 }
3534 ]
3535 },
3536 "jsx-tag-invalid": {
3537 "name": "invalid.illegal.tag.incomplete.tsx",
3538 "match": "<\\s*>"
3539 },
3540 "jsx-children": {
3541 "patterns": [
3542 {
3543 "include": "#jsx-tag-without-attributes"
3544 },
3545 {
3546 "include": "#jsx-child-tag"
3547 },
3548 {
3549 "include": "#jsx-tag-invalid"
3550 },
3551 {
3552 "include": "#jsx-evaluated-code"
3553 },
3554 {
3555 "include": "#jsx-entities"
3556 }
3557 ]
3558 },
3559 "jsx": {
3560 "patterns": [
3561 {
3562 "include": "#jsx-tag-without-attributes"
3563 },
3564 {
3565 "include": "#jsx-tag-in-expression"
3566 },
3567 {
3568 "include": "#jsx-tag-invalid"
3569 }
3570 ]
3571 }
3572 },
3573 "version": "https://github.com/Microsoft/TypeScript-TmLanguage/commit/4d0bdebb93aadc25ecbb903ebc897e9cd5fab69c"
3574}