Support arrows with multiline destructuring parameters

This commit is contained in:
Sheetal Nandi 2018-04-20 12:21:30 -07:00
Родитель 160a756335
Коммит fefa94101e
8 изменённых файлов: 391 добавлений и 92 удалений

Просмотреть файл

@ -32,6 +32,7 @@ variables:
matchingBraces: (\{([^\{\}]|(\{[^\{\}]*\}))*\})
matchingBrackets: (\[([^\[\]]|(\[[^\[\]]*\]))*\])
inlineComment: \/\*([^\*]|(\*[^\/]))*\*\/
lookBehindOfPossiblyMultilineArrowWithDestructuring: (?<=[(=,])
lookBehindOfPossiblyMultilineArrow: (?<=[(=,]|=>)
lookBehindOfObjectMemberPossiblyMultilineArrow: (?<=:)
# Identifier start | matching braces | matching parenthesis | matching square brackets
@ -63,7 +64,7 @@ variables:
(\s*:{{returnTypeOfArrow}})? # return type
\s*=> # arrow operator
)
possiblyMultilineArrow: ({{typeParameters}}?[\(]\s*$) # during lookup treat <typeparameters>?( followed by line end as arrow
possiblyMultilineArrow: ({{typeParameters}}?[\(]\s*([\{\[]\s*)?$) # during lookup treat <typeparameters>?( followed by line end as arrow
functionOrArrowLookup: |-
\s*(
((async\s+)?(
@ -1115,7 +1116,7 @@ repository:
'0': { name: meta.object-literal.key.ts punctuation.separator.key-value.ts }
end: (?=,|\})
patterns:
- begin: '{{lookBehindOfObjectMemberPossiblyMultilineArrow}}\s*(async)?(?=\s*{{typeParameters}}\(\s*$)'
- begin: '{{lookBehindOfObjectMemberPossiblyMultilineArrow}}\s*(async)?(?=\s*{{typeParameters}}\(\s*([\{\[]\s*)?$)'
beginCaptures:
'1': { name: storage.modifier.async.ts }
end: (?<=\))
@ -1129,7 +1130,7 @@ repository:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression-inside-possibly-arrow-parens'
- begin: '{{lookBehindOfObjectMemberPossiblyMultilineArrow}}\s*(async)?\s*(\()(?=\s*$)'
- begin: '{{lookBehindOfObjectMemberPossiblyMultilineArrow}}\s*(async)?\s*(\()(?=\s*([\{\[]\s*)?$)'
beginCaptures:
'1': { name: storage.modifier.async.ts }
'2': { name: meta.brace.round.ts }
@ -1198,20 +1199,27 @@ repository:
# but do this only from expression and as last resort
paren-expression-possibly-arrow:
patterns:
- begin: '{{lookBehindOfPossiblyMultilineArrowWithDestructuring}}\s*(async)?(?=\s*{{typeParameters}}\(\s*[\{\[]\s*$)'
beginCaptures:
'1': { name: storage.modifier.async.ts }
end: (?<=\))
patterns:
- include: '#paren-expression-possibly-arrow-with-typeparameters'
- begin: '{{lookBehindOfPossiblyMultilineArrow}}\s*(async)?(?=\s*{{typeParameters}}\(\s*$)'
beginCaptures:
'1': { name: storage.modifier.async.ts }
end: (?<=\))
patterns:
- include: '#type-parameters'
- begin: \(
beginCaptures:
'0': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression-inside-possibly-arrow-parens'
- include: '#paren-expression-possibly-arrow-with-typeparameters'
- begin: '{{lookBehindOfPossiblyMultilineArrowWithDestructuring}}\s*(async)?\s*(\()(?=\s*[\{\[]\s*$)'
beginCaptures:
'1': { name: storage.modifier.async.ts }
'2': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression-inside-possibly-arrow-parens'
- begin: '{{lookBehindOfPossiblyMultilineArrow}}\s*(async)?\s*(\()(?=\s*$)'
beginCaptures:
'1': { name: storage.modifier.async.ts }
@ -1223,6 +1231,18 @@ repository:
- include: '#expression-inside-possibly-arrow-parens'
- include: '#possibly-arrow-return-type'
paren-expression-possibly-arrow-with-typeparameters:
patterns:
- include: '#type-parameters'
- begin: \(
beginCaptures:
'0': { name: meta.brace.round.ts }
end: \)
endCaptures:
'0': { name: meta.brace.round.ts }
patterns:
- include: '#expression-inside-possibly-arrow-parens'
expression-inside-possibly-arrow-parens:
patterns:
- include: '#expressionWithoutIdentifiers'

Просмотреть файл

@ -422,7 +422,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?[\(]\s*$) |
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\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*)?
@ -463,7 +463,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?[\(]\s*$) |
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\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*)?
@ -841,7 +841,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?[\(]\s*$) |
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\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*)?
@ -882,7 +882,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?[\(]\s*$) |
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\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*)?
@ -1256,7 +1256,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?[\(]\s*$) |
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\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*)?
@ -1297,7 +1297,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?[\(]\s*$) |
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\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*)?
@ -3381,7 +3381,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?[\(]\s*$) |
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\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*)?
@ -3502,7 +3502,7 @@
<array>
<dict>
<key>begin</key>
<string>(?&lt;=:)\s*(async)?(?=\s*(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)\(\s*$)</string>
<string>(?&lt;=:)\s*(async)?(?=\s*(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)\(\s*([\{\[]\s*)?$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@ -3552,7 +3552,7 @@
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=:)\s*(async)?\s*(\()(?=\s*$)</string>
<string>(?&lt;=:)\s*(async)?\s*(\()(?=\s*([\{\[]\s*)?$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@ -3751,6 +3751,27 @@
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&lt;=[(=,])\s*(async)?(?=\s*(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)\(\s*[\{\[]\s*$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.async.ts</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#paren-expression-possibly-arrow-with-typeparameters</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=[(=,]|=&gt;)\s*(async)?(?=\s*(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)\(\s*$)</string>
@ -3768,36 +3789,41 @@
<array>
<dict>
<key>include</key>
<string>#type-parameters</string>
<string>#paren-expression-possibly-arrow-with-typeparameters</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=[(=,])\s*(async)?\s*(\()(?=\s*[\{\[]\s*$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>begin</key>
<string>\(</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>meta.brace.round.ts</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>meta.brace.round.ts</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expression-inside-possibly-arrow-parens</string>
</dict>
</array>
<key>name</key>
<string>storage.modifier.async.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>meta.brace.round.ts</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>meta.brace.round.ts</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expression-inside-possibly-arrow-parens</string>
</dict>
</array>
</dict>
@ -3841,6 +3867,45 @@
</dict>
</array>
</dict>
<key>paren-expression-possibly-arrow-with-typeparameters</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#type-parameters</string>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>beginCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>meta.brace.round.ts</string>
</dict>
</dict>
<key>end</key>
<string>\)</string>
<key>endCaptures</key>
<dict>
<key>0</key>
<dict>
<key>name</key>
<string>meta.brace.round.ts</string>
</dict>
</dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#expression-inside-possibly-arrow-parens</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>expression-inside-possibly-arrow-parens</key>
<dict>
<key>patterns</key>
@ -4895,7 +4960,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)?[\(]\s*$) |
((&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\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*)?

Просмотреть файл

@ -9,7 +9,7 @@ fileTypes: [tsx]
uuid: 805375ec-d614-41f5-8993-5843fe63ea82
variables:
possiblyMultilineArrow: ([\(]\s*$) # during lookup treat ( followed by line end as arrow
possiblyMultilineArrow: ([\(]\s*([\{\[]\s*)?$) # during lookup treat ( followed by line end as arrow
jsxTagOrAtrributeIdentifier: '[_$a-zA-Z][-$\w.]'
jsxTagNamespace: (?:({{jsxTagOrAtrributeIdentifier}}*)(?<!\.|-)(:))?
jsxTagName: \s*{{jsxTagNamespace}}((?:[a-z][a-z0-9]*|({{jsxTagOrAtrributeIdentifier}}*))(?<!\.|-))

Просмотреть файл

@ -426,7 +426,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
([\(]\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*)?
@ -467,7 +467,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
([\(]\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*)?
@ -845,7 +845,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
([\(]\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*)?
@ -886,7 +886,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
([\(]\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*)?
@ -1260,7 +1260,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
([\(]\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*)?
@ -1301,7 +1301,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
([\(]\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*)?
@ -3385,7 +3385,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
([\(]\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*)?
@ -3506,7 +3506,7 @@
<array>
<dict>
<key>begin</key>
<string>(?&lt;=:)\s*(async)?(?=\s*(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)\(\s*$)</string>
<string>(?&lt;=:)\s*(async)?(?=\s*(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)\(\s*([\{\[]\s*)?$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@ -3556,7 +3556,7 @@
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=:)\s*(async)?\s*(\()(?=\s*$)</string>
<string>(?&lt;=:)\s*(async)?\s*(\()(?=\s*([\{\[]\s*)?$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
@ -3755,6 +3755,27 @@
<dict>
<key>patterns</key>
<array>
<dict>
<key>begin</key>
<string>(?&lt;=[(=,])\s*(async)?(?=\s*(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)\(\s*[\{\[]\s*$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
</dict>
<key>end</key>
<string>(?&lt;=\))</string>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#paren-expression-possibly-arrow-with-typeparameters</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=[(=,]|=&gt;)\s*(async)?(?=\s*(&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;]|\&lt;\s*([_$[:alpha:]]|(\{([^\{\}]|(\{[^\{\}]*\}))*\})|(\(([^\(\)]|(\([^\(\)]*\)))*\))|(\[([^\[\]]|(\[[^\[\]]*\]))*\]))([^=&lt;&gt;]|=[^&lt;])*\&gt;)*&gt;\s*)\(\s*$)</string>
@ -3772,36 +3793,41 @@
<array>
<dict>
<key>include</key>
<string>#type-parameters</string>
<string>#paren-expression-possibly-arrow-with-typeparameters</string>
</dict>
</array>
</dict>
<dict>
<key>begin</key>
<string>(?&lt;=[(=,])\s*(async)?\s*(\()(?=\s*[\{\[]\s*$)</string>
<key>beginCaptures</key>
<dict>
<key>1</key>
<dict>
<key>begin</key>
<string>\(</string>
<key>beginCaptures</key>
<dict>
<key>0</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>#expression-inside-possibly-arrow-parens</string>
</dict>
</array>
<key>name</key>
<string>storage.modifier.async.tsx</string>
</dict>
<key>2</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>#expression-inside-possibly-arrow-parens</string>
</dict>
</array>
</dict>
@ -3845,6 +3871,45 @@
</dict>
</array>
</dict>
<key>paren-expression-possibly-arrow-with-typeparameters</key>
<dict>
<key>patterns</key>
<array>
<dict>
<key>include</key>
<string>#type-parameters</string>
</dict>
<dict>
<key>begin</key>
<string>\(</string>
<key>beginCaptures</key>
<dict>
<key>0</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>#expression-inside-possibly-arrow-parens</string>
</dict>
</array>
</dict>
</array>
</dict>
<key>expression-inside-possibly-arrow-parens</key>
<dict>
<key>patterns</key>
@ -4841,7 +4906,7 @@
([_$[:alpha:]][_$[:alnum:]]*\s*=&gt;)
)) |
((async\s*)?(
([\(]\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*)?

Просмотреть файл

@ -15,7 +15,7 @@ Grammar: TypeScript.tmLanguage
^
source.ts meta.var.expr.ts
^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.readwrite.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts entity.name.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^

Просмотреть файл

@ -55,7 +55,7 @@ Grammar: TypeScript.tmLanguage
^
source.ts meta.var.expr.ts
^^^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.readwrite.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts entity.name.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^
@ -249,7 +249,7 @@ Grammar: TypeScript.tmLanguage
^
source.ts meta.var.expr.ts
^^^^^^^^^^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts variable.other.readwrite.ts
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts meta.definition.variable.ts entity.name.function.ts
^
source.ts meta.var.expr.ts meta.var-single-variable.expr.ts
^

Просмотреть файл

@ -0,0 +1,140 @@
original file
-----------------------------------
class c {
private renderExploreItem = ({
item: offer
}: {
item: OfferModel | undefined
}) => {
return "something";
}
}
-----------------------------------
Grammar: TypeScript.tmLanguage
-----------------------------------
>class c {
^^^^^
source.ts meta.class.ts storage.type.class.ts
^
source.ts meta.class.ts
^
source.ts meta.class.ts entity.name.type.class.ts
^
source.ts meta.class.ts
^
source.ts meta.class.ts punctuation.definition.block.ts
^^
source.ts meta.class.ts
> private renderExploreItem = ({
^^^^
source.ts meta.class.ts
^^^^^^^
source.ts meta.class.ts storage.modifier.ts
^
source.ts meta.class.ts
^^^^^^^^^^^^^^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.definition.property.ts entity.name.function.ts
^
source.ts meta.class.ts meta.field.declaration.ts
^
source.ts meta.class.ts meta.field.declaration.ts keyword.operator.assignment.ts
^
source.ts meta.class.ts meta.field.declaration.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.brace.round.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts punctuation.definition.block.ts
^^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts
> item: offer
^^^^^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts
^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts meta.object.member.ts meta.object-literal.key.ts punctuation.separator.key-value.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts meta.object.member.ts
^^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts meta.object.member.ts variable.other.readwrite.ts
^^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts meta.object.member.ts
> }: {
^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts meta.object.member.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.objectliteral.ts punctuation.definition.block.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts keyword.operator.type.annotation.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts punctuation.definition.block.ts
^^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts
> item: OfferModel | undefined
^^^^^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts
^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts meta.field.declaration.ts meta.definition.property.ts variable.object.property.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts meta.field.declaration.ts meta.type.annotation.ts keyword.operator.type.annotation.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts meta.field.declaration.ts meta.type.annotation.ts
^^^^^^^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts meta.field.declaration.ts meta.type.annotation.ts entity.name.type.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts meta.field.declaration.ts meta.type.annotation.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts meta.field.declaration.ts meta.type.annotation.ts keyword.operator.type.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts meta.field.declaration.ts meta.type.annotation.ts
^^^^^^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts meta.field.declaration.ts meta.type.annotation.ts support.type.builtin.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts meta.field.declaration.ts meta.type.annotation.ts
> }) => {
^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.type.annotation.ts meta.object.type.ts punctuation.definition.block.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.brace.round.ts
^
source.ts meta.class.ts meta.field.declaration.ts
^^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts storage.type.function.arrow.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts punctuation.definition.block.ts
^^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts
> return "something";
^^^^^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts
^^^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts keyword.control.flow.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts string.quoted.double.ts punctuation.definition.string.begin.ts
^^^^^^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts string.quoted.double.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts string.quoted.double.ts punctuation.definition.string.end.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts punctuation.terminator.statement.ts
^^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts
> }
^^^^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts
^
source.ts meta.class.ts meta.field.declaration.ts meta.arrow.ts meta.block.ts punctuation.definition.block.ts
^
source.ts meta.class.ts meta.field.declaration.ts
>}
^
source.ts meta.class.ts punctuation.definition.block.ts

Просмотреть файл

@ -0,0 +1,9 @@
class c {
private renderExploreItem = ({
item: offer
}: {
item: OfferModel | undefined
}) => {
return "something";
}
}