Permalink
Branch: master
Find file Copy path
9344 lines (9344 sloc) 327 KB
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>name</key>
<string>TypeScriptReact</string>
<key>scopeName</key>
<string>source.tsx</string>
<key>fileTypes</key>
<array>
<string>tsx</string>
</array>
<key>uuid</key>
<string>805375ec-d614-41f5-8993-5843fe63ea82</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#directives</string>
</dict>
<dict>
<key>include</key>
<string>#statements</string>
</dict>
<dict>
<key>name</key>
<string>comment.line.shebang.ts</string>
<key>match</key>
<string>\A(#!).*(?=$)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.definition.comment.ts</string>
</dict>
</dict>
</dict>
</array>
<key>repository</key>
<dict>
<key>statements</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#declaration</string>
</dict>
<dict>
<key>include</key>
<string>#control-statement</string>
</dict>
<dict>
<key>include</key>
<string>#after-operator-block-as-object-literal</string>
</dict>
<dict>
<key>include</key>
<string>#decl-block</string>
</dict>
<dict>
<key>include</key>
<string>#label</string>
</dict>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-semicolon</string>
</dict>
</array>
</dict>
<key>declaration</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#decorator</string>
</dict>
<dict>
<key>include</key>
<string>#var-expr</string>
</dict>
<dict>
<key>include</key>
<string>#function-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#class-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#interface-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#enum-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#namespace-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#type-alias-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#import-equals-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#import-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#export-declaration</string>
</dict>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(declare|export)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
</array>
</dict>
<key>control-statement</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#switch-statement</string>
</dict>
<dict>
<key>include</key>
<string>#for-loop</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.trycatch.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(catch|finally|throw|try)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(break|continue|goto)\s+([_$[:alpha:]][_$[:alnum:]]*)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.loop.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>entity.name.label.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>keyword.control.loop.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(break|continue|do|goto|while)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.flow.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(return)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.switch.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(case|default|switch)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.conditional.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(else|if)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.with.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(with)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>name</key>
<string>keyword.control.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(package)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<dict>
<key>name</key>
<string>keyword.other.debugger.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(debugger)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
</array>
</dict>
<key>label</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)\s*(:)(?=\s*\{)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.label.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.separator.label.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#decl-block</string>
</dict>
</array>
</dict>
<dict>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)\s*(:)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.label.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.separator.label.tsx</string>
</dict>
</dict>
</dict>
</array>
</dict>
<key>expression</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expressionWithoutIdentifiers</string>
</dict>
<dict>
<key>include</key>
<string>#identifiers</string>
</dict>
<dict>
<key>include</key>
<string>#expressionPunctuations</string>
</dict>
</array>
</dict>
<key>expressionWithoutIdentifiers</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#jsx</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#regex</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#function-expression</string>
</dict>
<dict>
<key>include</key>
<string>#class-expression</string>
</dict>
<dict>
<key>include</key>
<string>#arrow-function</string>
</dict>
<dict>
<key>include</key>
<string>#paren-expression-possibly-arrow</string>
</dict>
<dict>
<key>include</key>
<string>#cast</string>
</dict>
<dict>
<key>include</key>
<string>#ternary-expression</string>
</dict>
<dict>
<key>include</key>
<string>#new-expr</string>
</dict>
<dict>
<key>include</key>
<string>#instanceof-expr</string>
</dict>
<dict>
<key>include</key>
<string>#object-literal</string>
</dict>
<dict>
<key>include</key>
<string>#expression-operators</string>
</dict>
<dict>
<key>include</key>
<string>#function-call</string>
</dict>
<dict>
<key>include</key>
<string>#literal</string>
</dict>
<dict>
<key>include</key>
<string>#support-objects</string>
</dict>
<dict>
<key>include</key>
<string>#paren-expression</string>
</dict>
</array>
</dict>
<key>expressionPunctuations</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-accessor</string>
</dict>
</array>
</dict>
<key>decorator</key>
<dict>
<key>name</key>
<string>meta.decorator.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))\@</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.decorator.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\s)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
</array>
</dict>
<key>var-expr</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.var.expr.tsx</string>
<key>begin</key>
<string>(?=(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))</string>
<key>end</key>
<string>(?!(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|(\s+(of|in)\s+)|^\s*$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?&lt;!^let|[^\._$[:alnum:]]let|^var|[^\._$[:alnum:]]var)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(var|let)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\S)</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-variable</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-variable</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>(,)\s*((?!\S)|(?=\/\/))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.comma.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?&lt;=\S)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#single-line-comment-consuming-line-ending</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-variable</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-variable</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.var.expr.tsx</string>
<key>begin</key>
<string>(?=(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?!(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))((?=;|}|(\s+(of|in)\s+)|^\s*$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|((?&lt;!^const|[^\._$[:alnum:]]const)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(const(?!\s+enum\b))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\S)</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-const</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-const</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>(,)\s*((?!\S)|(?=\/\/))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>punctuation.separator.comma.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;!,)(((?==|;|}|(\s+(of|in)\s+)|^\s*$))|((?&lt;=\S)(?=\s*$)))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#single-line-comment-consuming-line-ending</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-const</string>
</dict>
<dict>
<key>include</key>
<string>#var-single-const</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>var-single-variable</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.var-single-variable.expr.tsx</string>
<key>begin</key>
<string>(?x)([_$[:alpha:]][_$[:alnum:]]*)(\!)?(?=\s*
# function assignment |
(=\s*(
((async\s+)?(
(function\s*[(&lt;*]) |
(function\s+) |
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$)) |
# sure shot arrow functions even if =&gt; is on new line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?
[(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)? # typeparameters
\(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
(\s*:\s*([^&lt;&gt;\(\)\{\}]|\&lt;[^&lt;&gt;]+\&gt;|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
\s*=&gt; # arrow operator
)
))
)) |
# typeannotation is fn type: &lt; | () | (... | (param: | (param, | (param? | (param= | (param) =&gt;
(:\s*(
(&lt;) |
([(]\s*(
([)]) |
(\.\.\.) |
([_$[:alnum:]]+\s*(
([:,?=])|
([)]\s*=&gt;)
))
))
)) |
(:\s*((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$))) |
(:\s*(=&gt;|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(&lt;[^&lt;&gt;]*&gt;)|[^&lt;&gt;(),=])+=\s*(
((async\s+)?(
(function\s*[(&lt;*]) |
(function\s+) |
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$)) |
# sure shot arrow functions even if =&gt; is on new line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?
[(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)? # typeparameters
\(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
(\s*:\s*([^&lt;&gt;\(\)\{\}]|\&lt;[^&lt;&gt;]+\&gt;|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
\s*=&gt; # arrow operator
)
))
)))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.definition.variable.tsx entity.name.function.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.definiteassignment.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=$|^|[;,=}]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#var-single-variable-type-annotation</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.var-single-variable.expr.tsx</string>
<key>begin</key>
<string>([[:upper:]][_$[:digit:][:upper:]]*)(?![_$[:alnum:]])(\!)?</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.definition.variable.tsx variable.other.constant.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.definiteassignment.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=$|^|[;,=}]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#var-single-variable-type-annotation</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.var-single-variable.expr.tsx</string>
<key>begin</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)(\!)?</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.definition.variable.tsx variable.other.readwrite.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.definiteassignment.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=$|^|[;,=}]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#var-single-variable-type-annotation</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>var-single-const</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.var-single-variable.expr.tsx</string>
<key>begin</key>
<string>(?x)([_$[:alpha:]][_$[:alnum:]]*)(?=\s*
# function assignment |
(=\s*(
((async\s+)?(
(function\s*[(&lt;*]) |
(function\s+) |
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$)) |
# sure shot arrow functions even if =&gt; is on new line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?
[(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)? # typeparameters
\(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
(\s*:\s*([^&lt;&gt;\(\)\{\}]|\&lt;[^&lt;&gt;]+\&gt;|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
\s*=&gt; # arrow operator
)
))
)) |
# typeannotation is fn type: &lt; | () | (... | (param: | (param, | (param? | (param= | (param) =&gt;
(:\s*(
(&lt;) |
([(]\s*(
([)]) |
(\.\.\.) |
([_$[:alnum:]]+\s*(
([:,?=])|
([)]\s*=&gt;)
))
))
)) |
(:\s*((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$))) |
(:\s*(=&gt;|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(&lt;[^&lt;&gt;]*&gt;)|[^&lt;&gt;(),=])+=\s*(
((async\s+)?(
(function\s*[(&lt;*]) |
(function\s+) |
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$)) |
# sure shot arrow functions even if =&gt; is on new line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?
[(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)? # typeparameters
\(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
(\s*:\s*([^&lt;&gt;\(\)\{\}]|\&lt;[^&lt;&gt;]+\&gt;|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
\s*=&gt; # arrow operator
)
))
)))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.definition.variable.tsx variable.other.constant.tsx entity.name.function.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=$|^|[;,=}]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#var-single-variable-type-annotation</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.var-single-variable.expr.tsx</string>
<key>begin</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.definition.variable.tsx variable.other.constant.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=$|^|[;,=}]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#var-single-variable-type-annotation</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>var-single-variable-type-annotation</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#type-annotation</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
</array>
</dict>
<key>destructuring-variable</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.object-binding-pattern-variable.tsx</string>
<key>begin</key>
<string>(?&lt;!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)</string>
<key>end</key>
<string>(?=$|^|[;,=}]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#object-binding-pattern</string>
</dict>
<dict>
<key>include</key>
<string>#type-annotation</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.array-binding-pattern-variable.tsx</string>
<key>begin</key>
<string>(?&lt;!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)</string>
<key>end</key>
<string>(?=$|^|[;,=}]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#array-binding-pattern</string>
</dict>
<dict>
<key>include</key>
<string>#type-annotation</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>destructuring-const</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.object-binding-pattern-variable.tsx</string>
<key>begin</key>
<string>(?&lt;!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\{)</string>
<key>end</key>
<string>(?=$|^|[;,=}]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#object-binding-pattern-const</string>
</dict>
<dict>
<key>include</key>
<string>#type-annotation</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.array-binding-pattern-variable.tsx</string>
<key>begin</key>
<string>(?&lt;!=|:|^of|[^\._$[:alnum:]]of|^in|[^\._$[:alnum:]]in)\s*(?=\[)</string>
<key>end</key>
<string>(?=$|^|[;,=}]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#array-binding-pattern-const</string>
</dict>
<dict>
<key>include</key>
<string>#type-annotation</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>object-binding-element</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>(?x)(?=((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))</string>
<key>end</key>
<string>(?=,|\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#object-binding-element-propertyName</string>
</dict>
<dict>
<key>include</key>
<string>#binding-element</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#object-binding-pattern</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-variable-rest</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<key>object-binding-element-const</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>(?x)(?=((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))</string>
<key>end</key>
<string>(?=,|\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#object-binding-element-propertyName</string>
</dict>
<dict>
<key>include</key>
<string>#binding-element-const</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#object-binding-pattern-const</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-variable-rest-const</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<key>object-binding-element-propertyName</key>
<dict>
<key>begin</key>
<string>(?x)(?=((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))</string>
<key>end</key>
<string>(:)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.destructuring.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#array-literal</string>
</dict>
<dict>
<key>include</key>
<string>#numeric-literal</string>
</dict>
<dict>
<key>name</key>
<string>variable.object.property.tsx</string>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)</string>
</dict>
</array>
</dict>
<key>binding-element</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#numeric-literal</string>
</dict>
<dict>
<key>include</key>
<string>#regex</string>
</dict>
<dict>
<key>include</key>
<string>#object-binding-pattern</string>
</dict>
<dict>
<key>include</key>
<string>#array-binding-pattern</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-variable-rest</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
</array>
</dict>
<key>binding-element-const</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#numeric-literal</string>
</dict>
<dict>
<key>include</key>
<string>#regex</string>
</dict>
<dict>
<key>include</key>
<string>#object-binding-pattern-const</string>
</dict>
<dict>
<key>include</key>
<string>#array-binding-pattern-const</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-variable-rest-const</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
</array>
</dict>
<key>destructuring-variable-rest</key>
<dict>
<key>match</key>
<string>(?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>meta.definition.variable.tsx variable.other.readwrite.tsx</string>
</dict>
</dict>
</dict>
<key>destructuring-variable-rest-const</key>
<dict>
<key>match</key>
<string>(?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>meta.definition.variable.tsx variable.other.constant.tsx</string>
</dict>
</dict>
</dict>
<key>object-binding-pattern</key>
<dict>
<key>begin</key>
<string>(?:(\.\.\.)\s*)?(\{)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.object.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.object.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#object-binding-element</string>
</dict>
</array>
</dict>
<key>object-binding-pattern-const</key>
<dict>
<key>begin</key>
<string>(?:(\.\.\.)\s*)?(\{)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.object.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.object.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#object-binding-element-const</string>
</dict>
</array>
</dict>
<key>array-binding-pattern</key>
<dict>
<key>begin</key>
<string>(?:(\.\.\.)\s*)?(\[)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.array.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.array.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#binding-element</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<key>array-binding-pattern-const</key>
<dict>
<key>begin</key>
<string>(?:(\.\.\.)\s*)?(\[)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.array.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.array.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#binding-element-const</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<key>parameter-name</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(public|protected|private|readonly)\s+(?=(public|protected|private|readonly)\s+)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>match</key>
<string>(?x)(?:(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?&lt;!=|:)(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)(?=\s*
# function assignment |
(=\s*(
((async\s+)?(
(function\s*[(&lt;*]) |
(function\s+) |
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$)) |
# sure shot arrow functions even if =&gt; is on new line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?
[(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)? # typeparameters
\(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
(\s*:\s*([^&lt;&gt;\(\)\{\}]|\&lt;[^&lt;&gt;]+\&gt;|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
\s*=&gt; # arrow operator
)
))
)) |
# typeannotation is fn type: &lt; | () | (... | (param: | (param, | (param? | (param= | (param) =&gt;
(:\s*(
(&lt;) |
([(]\s*(
([)]) |
(\.\.\.) |
([_$[:alnum:]]+\s*(
([:,?=])|
([)]\s*=&gt;)
))
))
)) |
(:\s*((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$))) |
(:\s*(=&gt;|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(&lt;[^&lt;&gt;]*&gt;)|[^&lt;&gt;(),=])+=\s*(
((async\s+)?(
(function\s*[(&lt;*]) |
(function\s+) |
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$)) |
# sure shot arrow functions even if =&gt; is on new line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?
[(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)? # typeparameters
\(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
(\s*:\s*([^&lt;&gt;\(\)\{\}]|\&lt;[^&lt;&gt;]+\&gt;|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
\s*=&gt; # arrow operator
)
))
)))</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>entity.name.function.tsx variable.language.this.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>entity.name.function.tsx</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>keyword.operator.optional.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>match</key>
<string>(?x)(?:(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(public|private|protected|readonly)\s+)?(?:(\.\.\.)\s*)?(?&lt;!=|:)(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(this)|([_$[:alpha:]][_$[:alnum:]]*))(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))\s*(\??)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>variable.parameter.tsx variable.language.this.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>variable.parameter.tsx</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>keyword.operator.optional.tsx</string>
</dict>
</dict>
</dict>
</array>
</dict>
<key>destructuring-parameter</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.parameter.object-binding-pattern.tsx</string>
<key>begin</key>
<string>(?&lt;!=|:)\s*(?:(\.\.\.)\s*)?(\{)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.object.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.object.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parameter-object-binding-element</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.paramter.array-binding-pattern.tsx</string>
<key>begin</key>
<string>(?&lt;!=|:)\s*(?:(\.\.\.)\s*)?(\[)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.array.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.array.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parameter-binding-element</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>parameter-object-binding-element</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>(?x)(?=((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(:))</string>
<key>end</key>
<string>(?=,|\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#object-binding-element-propertyName</string>
</dict>
<dict>
<key>include</key>
<string>#parameter-binding-element</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#parameter-object-binding-pattern</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-parameter-rest</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<key>parameter-binding-element</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#numeric-literal</string>
</dict>
<dict>
<key>include</key>
<string>#regex</string>
</dict>
<dict>
<key>include</key>
<string>#parameter-object-binding-pattern</string>
</dict>
<dict>
<key>include</key>
<string>#parameter-array-binding-pattern</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-parameter-rest</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
</array>
</dict>
<key>destructuring-parameter-rest</key>
<dict>
<key>match</key>
<string>(?:(\.\.\.)\s*)?([_$[:alpha:]][_$[:alnum:]]*)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>variable.parameter.tsx</string>
</dict>
</dict>
</dict>
<key>parameter-object-binding-pattern</key>
<dict>
<key>begin</key>
<string>(?:(\.\.\.)\s*)?(\{)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.object.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.object.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parameter-object-binding-element</string>
</dict>
</array>
</dict>
<key>parameter-array-binding-pattern</key>
<dict>
<key>begin</key>
<string>(?:(\.\.\.)\s*)?(\[)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.array.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\]</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.binding-pattern.array.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#parameter-binding-element</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
<key>field-declaration</key>
<dict>
<key>name</key>
<string>meta.field.declaration.tsx</string>
<key>begin</key>
<string>(?x)(?&lt;!\()(?:(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(readonly)\s+)?(?=\s*((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?x)(?=\}|;|,|$|(^(?!\s*((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(?:(?:(\?)|(\!))\s*)?(=|:|;|,|$))))|(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#type-annotation</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#array-literal</string>
</dict>
<dict>
<key>include</key>
<string>#numeric-literal</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>match</key>
<string>(?x)([_$[:alpha:]][_$[:alnum:]]*)(?:(\?)|(\!))?(?=\s*\s*
# function assignment |
(=\s*(
((async\s+)?(
(function\s*[(&lt;*]) |
(function\s+) |
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$)) |
# sure shot arrow functions even if =&gt; is on new line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?
[(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)? # typeparameters
\(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
(\s*:\s*([^&lt;&gt;\(\)\{\}]|\&lt;[^&lt;&gt;]+\&gt;|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
\s*=&gt; # arrow operator
)
))
)) |
# typeannotation is fn type: &lt; | () | (... | (param: | (param, | (param? | (param= | (param) =&gt;
(:\s*(
(&lt;) |
([(]\s*(
([)]) |
(\.\.\.) |
([_$[:alnum:]]+\s*(
([:,?=])|
([)]\s*=&gt;)
))
))
)) |
(:\s*((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$))) |
(:\s*(=&gt;|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(&lt;[^&lt;&gt;]*&gt;)|[^&lt;&gt;(),=])+=\s*(
((async\s+)?(
(function\s*[(&lt;*]) |
(function\s+) |
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*$)|([\(]\s*([\{\[]\s*)?$)) |
# sure shot arrow functions even if =&gt; is on new line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?
[(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)? # typeparameters
\(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
(\s*:\s*([^&lt;&gt;\(\)\{\}]|\&lt;[^&lt;&gt;]+\&gt;|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
\s*=&gt; # arrow operator
)
))
)))</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.definition.property.tsx entity.name.function.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.optional.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.operator.definiteassignment.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>meta.definition.property.tsx variable.object.property.tsx</string>
<key>match</key>
<string>[_$[:alpha:]][_$[:alnum:]]*</string>
</dict>
<dict>
<key>name</key>
<string>keyword.operator.optional.tsx</string>
<key>match</key>
<string>\?</string>
</dict>
<dict>
<key>name</key>
<string>keyword.operator.definiteassignment.tsx</string>
<key>match</key>
<string>\!</string>
</dict>
</array>
</dict>
<key>variable-initializer</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&lt;!=|!)(=)(?!=)(?=\s*\S)(?!\s*.*=&gt;\s*$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.assignment.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=$|^|[,);}\]]|(\s+(of|in)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;!=|!)(=)(?!=)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.assignment.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=[,);}\]]|(\s+(of|in)\s+))|(?=^\s*$)|(?&lt;=\S)(?&lt;!=)(?=\s*$)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>function-declaration</key>
<dict>
<key>name</key>
<string>meta.function.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?&lt;=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>storage.type.function.tsx</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>keyword.generator.asterisk.tsx</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>meta.definition.function.tsx entity.name.function.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))|(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#function-name</string>
</dict>
<dict>
<key>include</key>
<string>#function-body</string>
</dict>
</array>
</dict>
<key>function-expression</key>
<dict>
<key>name</key>
<string>meta.function.expression.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?&lt;=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.type.function.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.generator.asterisk.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>meta.definition.function.tsx entity.name.function.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=;)|(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#function-name</string>
</dict>
<dict>
<key>include</key>
<string>#single-line-comment-consuming-line-ending</string>
</dict>
<dict>
<key>include</key>
<string>#function-body</string>
</dict>
</array>
</dict>
<key>function-name</key>
<dict>
<key>name</key>
<string>meta.definition.function.tsx entity.name.function.tsx</string>
<key>match</key>
<string>[_$[:alpha:]][_$[:alnum:]]*</string>
</dict>
<key>function-body</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#type-parameters</string>
</dict>
<dict>
<key>include</key>
<string>#function-parameters</string>
</dict>
<dict>
<key>include</key>
<string>#return-type</string>
</dict>
<dict>
<key>include</key>
<string>#decl-block</string>
</dict>
<dict>
<key>name</key>
<string>keyword.generator.asterisk.tsx</string>
<key>match</key>
<string>\*</string>
</dict>
</array>
</dict>
<key>method-declaration</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.method.declaration.tsx</string>
<key>begin</key>
<string>(?x)(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?\s*\b(constructor)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>storage.type.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\}|;|,|$)|(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#method-declaration-name</string>
</dict>
<dict>
<key>include</key>
<string>#function-body</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.method.declaration.tsx</string>
<key>begin</key>
<string>(?x)(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:(?:\s*\b(new)\b(?!:)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.)))|(?:(\*)\s*)?)(?=\s*[\(\&lt;])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>keyword.operator.new.tsx</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>keyword.generator.asterisk.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\}|;|,|$)|(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#method-declaration-name</string>
</dict>
<dict>
<key>include</key>
<string>#function-body</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.method.declaration.tsx</string>
<key>begin</key>
<string>(?x)(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:\b(public|private|protected)\s+)?(?:\b(abstract)\s+)?(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\&lt;])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>storage.type.property.tsx</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>keyword.generator.asterisk.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\}|;|,|$)|(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#method-declaration-name</string>
</dict>
<dict>
<key>include</key>
<string>#function-body</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>object-literal-method-declaration</key>
<dict>
<key>name</key>
<string>meta.method.declaration.tsx</string>
<key>begin</key>
<string>(?x)(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\&lt;])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.type.property.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.generator.asterisk.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\}|;|,)|(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#method-declaration-name</string>
</dict>
<dict>
<key>include</key>
<string>#function-body</string>
</dict>
<dict>
<key>begin</key>
<string>(?x)(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:\b(async)\s+)?(?:\b(get|set)\s+)?(?:(\*)\s*)?(?=\s*(((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??))\s*[\(\&lt;])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.type.property.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.generator.asterisk.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\(|\&lt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#method-declaration-name</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>method-declaration-name</key>
<dict>
<key>begin</key>
<string>(?x)(?=((\b(?&lt;!\$)0(?:x|X)[0-9a-fA-F][0-9a-fA-F_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:b|B)[01][01_]*(n)?\b(?!\$))|(\b(?&lt;!\$)0(?:o|O)?[0-7][0-7_]*(n)?\b(?!\$))|((?&lt;!\$)(?:
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.1E+3
(?:\b[0-9][0-9_]*(\.)[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1.E+3
(?:\B(\.)[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # .1E+3
(?:\b[0-9][0-9_]*[eE][+-]?[0-9][0-9_]*(n)?\b)| # 1E+3
(?:\b[0-9][0-9_]*(\.)[0-9][0-9_]*(n)?\b)| # 1.1
(?:\b[0-9][0-9_]*(\.)(n)?\B)| # 1.
(?:\B(\.)[0-9][0-9_]*(n)?\b)| # .1
(?:\b[0-9][0-9_]*(n)?\b(?!\.)) # 1
)(?!\$))|([_$[:alpha:]][_$[:alnum:]]*)|(\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\]))\s*(\??)\s*[\(\&lt;])</string>
<key>end</key>
<string>(?=\(|\&lt;)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#array-literal</string>
</dict>
<dict>
<key>include</key>
<string>#numeric-literal</string>
</dict>
<dict>
<key>name</key>
<string>meta.definition.method.tsx entity.name.function.tsx</string>
<key>match</key>
<string>[_$[:alpha:]][_$[:alnum:]]*</string>
</dict>
<dict>
<key>name</key>
<string>keyword.operator.optional.tsx</string>
<key>match</key>
<string>\?</string>
</dict>
</array>
</dict>
<key>arrow-function</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.arrow.tsx</string>
<key>match</key>
<string>(?:(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(\basync)\s+)?([_$[:alpha:]][_$[:alnum:]]*)\s*(?==&gt;)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>variable.parameter.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>meta.arrow.tsx</string>
<key>begin</key>
<string>(?x) (?:
(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(\basync)
)? ((?&lt;![})!\]])\s*
(?=
# sure shot arrow functions even if =&gt; is on new line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?
[(]\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*
(
([)]\s*:) | # ():
((\.\.\.\s*)?[_$[:alpha:]][_$[:alnum:]]*\s*:) # [(]param: | [(]...param:
)
) |
(
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
) |
# arrow function possible to detect only with =&gt; on same line
(
(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)? # typeparameters
\(\s*(\/\*([^\*]|(\*[^\/]))*\*\/\s*)*(([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\[([^\[\]]|(\[[^\[\]]*\]))*\])|(\.\.\.\s*[_$[:alpha:]]))([^()]|(\(([^\(\)]|(\([^\(\)]*\)))*\)))*)?\) # parameters
(\s*:\s*([^&lt;&gt;\(\)\{\}]|\&lt;[^&lt;&gt;]+\&gt;|\([^\(\)]+\)|\{[^\{\}]+\})+)? # return type
\s*=&gt; # arrow operator
)
)
)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?==&gt;|\{|(^\s*(export|function|class|interface|let|var|const|import|enum|namespace|module|type|abstract|declare)\s+))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#type-parameters</string>
</dict>
<dict>
<key>include</key>
<string>#function-parameters</string>
</dict>
<dict>
<key>include</key>
<string>#arrow-return-type</string>
</dict>
<dict>
<key>include</key>
<string>#possibly-arrow-return-type</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.arrow.tsx</string>
<key>begin</key>
<string>=&gt;</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>storage.type.function.arrow.tsx</string>
</dict>
</dict>
<key>end</key>
<string>((?&lt;=\}|\S)(?&lt;!=&gt;)|((?!\{)(?=\S)))(?!\/[\/\*])</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#single-line-comment-consuming-line-ending</string>
</dict>
<dict>
<key>include</key>
<string>#decl-block</string>
</dict>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>indexer-declaration</key>
<dict>
<key>name</key>
<string>meta.indexer.declaration.tsx</string>
<key>begin</key>
<string>(?:(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s*(?=:)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>meta.brace.square.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>variable.parameter.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(\])\s*(\?\s*)?|$</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.brace.square.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.optional.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#type-annotation</string>
</dict>
</array>
</dict>
<key>indexer-mapped-type-declaration</key>
<dict>
<key>name</key>
<string>meta.indexer.mappedtype.declaration.tsx</string>
<key>begin</key>
<string>(?:(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))([+-])?(readonly)\s*)?\s*(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.type.modifier.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>meta.brace.square.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>entity.name.type.tsx</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>keyword.operator.expression.in.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(\])([+-])?\s*(\?\s*)?|$</string>
<key>endCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>meta.brace.square.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.type.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.operator.optional.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#type</string>
</dict>
</array>
</dict>
<key>function-parameters</key>
<dict>
<key>name</key>
<string>meta.parameters.tsx</string>
<key>begin</key>
<string>\(</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.parameters.begin.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.parameters.end.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#function-parameters-body</string>
</dict>
</array>
</dict>
<key>function-parameters-body</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#decorator</string>
</dict>
<dict>
<key>include</key>
<string>#destructuring-parameter</string>
</dict>
<dict>
<key>include</key>
<string>#parameter-name</string>
</dict>
<dict>
<key>include</key>
<string>#parameter-type-annotation</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>name</key>
<string>punctuation.separator.parameter.tsx</string>
<key>match</key>
<string>,</string>
</dict>
</array>
</dict>
<key>class-declaration</key>
<dict>
<key>name</key>
<string>meta.class.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(class)\b(?=\s+|/[/*])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>storage.type.class.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#class-declaration-or-expression-patterns</string>
</dict>
</array>
</dict>
<key>class-expression</key>
<dict>
<key>name</key>
<string>meta.class.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(class)\b(?=\s+|[&lt;{]|\/[\/*])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.type.class.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#class-declaration-or-expression-patterns</string>
</dict>
</array>
</dict>
<key>class-declaration-or-expression-patterns</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#class-or-interface-heritage</string>
</dict>
<dict>
<key>match</key>
<string>[_$[:alpha:]][_$[:alnum:]]*</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>entity.name.type.class.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>include</key>
<string>#type-parameters</string>
</dict>
<dict>
<key>include</key>
<string>#class-or-interface-body</string>
</dict>
</array>
</dict>
<key>interface-declaration</key>
<dict>
<key>name</key>
<string>meta.interface.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(?:(abstract)\s+)?\b(interface)\b(?=\s+|/[/*])</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>storage.type.interface.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#class-or-interface-heritage</string>
</dict>
<dict>
<key>match</key>
<string>[_$[:alpha:]][_$[:alnum:]]*</string>
<key>captures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>entity.name.type.interface.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>include</key>
<string>#type-parameters</string>
</dict>
<dict>
<key>include</key>
<string>#class-or-interface-body</string>
</dict>
</array>
</dict>
<key>class-or-interface-heritage</key>
<dict>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:\b(extends|implements)\b)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\{)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#class-or-interface-heritage</string>
</dict>
<dict>
<key>include</key>
<string>#type-parameters</string>
</dict>
<dict>
<key>include</key>
<string>#expressionWithoutIdentifiers</string>
</dict>
<dict>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))(?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s*\??\.\s*[_$[:alpha:]][_$[:alnum:]]*)*\s*)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.type.module.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.accessor.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.accessor.optional.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.other.inherited-class.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>include</key>
<string>#expressionPunctuations</string>
</dict>
</array>
</dict>
<key>class-or-interface-body</key>
<dict>
<key>begin</key>
<string>\{</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.block.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.block.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#decorator</string>
</dict>
<dict>
<key>include</key>
<string>#method-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#indexer-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#field-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#type-annotation</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
<dict>
<key>include</key>
<string>#access-modifier</string>
</dict>
<dict>
<key>include</key>
<string>#property-accessor</string>
</dict>
<dict>
<key>include</key>
<string>#async-modifier</string>
</dict>
<dict>
<key>include</key>
<string>#after-operator-block-as-object-literal</string>
</dict>
<dict>
<key>include</key>
<string>#decl-block</string>
</dict>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-semicolon</string>
</dict>
</array>
</dict>
<key>access-modifier</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(abstract|public|protected|private|readonly|static)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<key>property-accessor</key>
<dict>
<key>name</key>
<string>storage.type.property.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(get|set)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<key>async-modifier</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(async)(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
</dict>
<key>enum-declaration</key>
<dict>
<key>name</key>
<string>meta.enum.declaration.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?(?:\b(const)\s+)?\b(enum)\s+([_$[:alpha:]][_$[:alnum:]]*)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>storage.type.enum.tsx</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>entity.name.type.enum.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\})</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>\{</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.block.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\}</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>punctuation.definition.block.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>begin</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>variable.other.enummember.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=,|\}|$)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?=((\'([^\'\\]|\\\'|\\)*\')|(\"([^\"\\]|\\\"|\\)*\")|(\`([^\`\\]|\\\`|\\)*\`)|(\[([^\[\]]|\[[^\[\]]*\])+\])))</string>
<key>end</key>
<string>(?=,|\}|$)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>include</key>
<string>#array-literal</string>
</dict>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#variable-initializer</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#punctuation-comma</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>namespace-declaration</key>
<dict>
<key>name</key>
<string>meta.namespace.declaration.tsx</string>
<key>begin</key>
<string>(?:(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(namespace|module)\s+(?=[_$[:alpha:]"'`]))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.namespace.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\})|(?=;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>name</key>
<string>entity.name.type.module.tsx</string>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)</string>
</dict>
<dict>
<key>include</key>
<string>#punctuation-accessor</string>
</dict>
<dict>
<key>include</key>
<string>#decl-block</string>
</dict>
</array>
</dict>
<key>type-alias-declaration</key>
<dict>
<key>name</key>
<string>meta.type.declaration.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(type)\b\s+([_$[:alpha:]][_$[:alnum:]]*)\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.type.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>entity.name.type.alias.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\}|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#type-parameters</string>
</dict>
<dict>
<key>begin</key>
<string>(=)\s*</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.operator.assignment.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=\}|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#type</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>import-equals-declaration</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>meta.import-equals.external.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(require)\s*(\()</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.control.import.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>variable.other.readwrite.alias.tsx</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>keyword.operator.assignment.tsx</string>
</dict>
<key>6</key>
<dict>
<key>name</key>
<string>keyword.control.require.tsx</string>
</dict>
<key>7</key>
<dict>
<key>name</key>
<string>meta.brace.round.tsx</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>meta.brace.round.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.import-equals.internal.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)\s+([_$[:alpha:]][_$[:alnum:]]*)\s*(=)\s*(?!require\b)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.control.import.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>variable.other.readwrite.alias.tsx</string>
</dict>
<key>5</key>
<dict>
<key>name</key>
<string>keyword.operator.assignment.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=;|$|^)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)\s*(?:(\.)|(\?\.(?!\s*[[:digit:]])))</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.type.module.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>punctuation.accessor.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.accessor.optional.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>variable.other.readwrite.tsx</string>
<key>match</key>
<string>([_$[:alpha:]][_$[:alnum:]]*)</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>import-declaration</key>
<dict>
<key>name</key>
<string>meta.import.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(?:(\bexport)\s+)?(?:(\bdeclare)\s+)?\b(import)(?!\s*[:\(])(?![_$[:alnum:]])(?:(?=\.\.\.)|(?!\.))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>storage.modifier.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.control.import.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;!^import|[^\._$[:alnum:]]import)(?=;|$|^)</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#comment</string>
</dict>
<dict>
<key>include</key>
<string>#string</string>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=^import|[^\._$[:alnum:]]import)(?!\s*["'])</string>
<key>end</key>
<string>\bfrom\b</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.control.from.tsx</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#import-export-declaration</string>
</dict>
</array>
</dict>
<dict>
<key>include</key>
<string>#import-export-declaration</string>
</dict>
</array>
</dict>
<key>export-declaration</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(export)\s+(as)\s+(namespace)\s+([_$[:alpha:]][_$[:alnum:]]*)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.control.as.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>storage.type.namespace.tsx</string>
</dict>
<key>4</key>
<dict>
<key>name</key>
<string>entity.name.type.module.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>name</key>
<string>meta.export.default.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(export)(?:(?:\s*(=))|(?:\s+(default)(?=\s+)))</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.assignment.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>keyword.control.default.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#interface-declaration</string>
</dict>
<dict>
<key>include</key>
<string>#expression</string>
</dict>
</array>
</dict>
<dict>
<key>name</key>
<string>meta.export.tsx</string>
<key>begin</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))(export)\b(?!(\$)|(\s*:))((?=\s*[\{*])|((?=\s*[_$[:alpha:]][_$[:alnum:]]*(\s|,))(?!\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b)))</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>keyword.control.export.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?=$|;|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#import-export-declaration</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>import-export-declaration</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>