Skip to content

Commit 398fb82

Browse files
committed
Handle typoeof operator
Fixes #858
1 parent 10e222a commit 398fb82

File tree

5 files changed

+419
-3
lines changed

5 files changed

+419
-3
lines changed

TypeScript.YAML-tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1740,7 +1740,7 @@ repository:
17401740
begin: '{{startOfIdentifier}}typeof{{endOfIdentifier}}'
17411741
beginCaptures:
17421742
'0': { name: keyword.operator.expression.typeof.ts }
1743-
end: (?=[,);}\]=>]|$|{{endOfStatement}})
1743+
end: (?=[,);}\]=>:&|{]|$|{{endOfStatement}})
17441744
patterns:
17451745
- include: '#expression'
17461746

TypeScript.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5648,7 +5648,7 @@
56485648
</dict>
56495649
</dict>
56505650
<key>end</key>
5651-
<string>(?=[,);}\]=&gt;]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))</string>
5651+
<string>(?=[,);}\]=&gt;:&amp;|{]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))</string>
56525652
<key>patterns</key>
56535653
<array>
56545654
<dict>

TypeScriptReact.tmLanguage

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5594,7 +5594,7 @@
55945594
</dict>
55955595
</dict>
55965596
<key>end</key>
5597-
<string>(?=[,);}\]=&gt;]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))</string>
5597+
<string>(?=[,);}\]=&gt;:&amp;|{]|$|;|^\s*$|(?:^\s*(?:abstract|async|class|const|declare|enum|export|function|import|interface|let|module|namespace|return|type|var)\b))</string>
55985598
<key>patterns</key>
55995599
<array>
56005600
<dict>

0 commit comments

Comments
 (0)