Skip to content

Commit 2ba4658

Browse files
committed
Fix the incorrectly detected arrow function type parameters which could be just relational operations
Fixes #403
1 parent 8011e87 commit 2ba4658

5 files changed

+1519
-15
lines changed

TypeScript.YAML-tmLanguage

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,11 +1607,7 @@ repository:
16071607
)
16081608
) |
16091609
(
1610-
[<]\s*[_$[:alpha:]][_$[:alnum:]]*
1611-
(
1612-
(\s+extends\s*[^=>]) | # < typeparam extends
1613-
(\s*[,]) # < typeparam,
1614-
)
1610+
[<]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=>] # < typeparam extends
16151611
) |
16161612
# arrow function possible to detect only with => on same line
16171613
(

TypeScript.tmLanguage

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4413,11 +4413,7 @@
44134413
)
44144414
) |
44154415
(
4416-
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*
4417-
(
4418-
(\s+extends\s*[^=&gt;]) | # &lt; typeparam extends
4419-
(\s*[,]) # &lt; typeparam,
4420-
)
4416+
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
44214417
) |
44224418
# arrow function possible to detect only with =&gt; on same line
44234419
(

TypeScriptReact.tmLanguage

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4395,11 +4395,7 @@
43954395
)
43964396
) |
43974397
(
4398-
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*
4399-
(
4400-
(\s+extends\s*[^=&gt;]) | # &lt; typeparam extends
4401-
(\s*[,]) # &lt; typeparam,
4402-
)
4398+
[&lt;]\s*[_$[:alpha:]][_$[:alnum:]]*\s+extends\s*[^=&gt;] # &lt; typeparam extends
44034399
) |
44044400
# arrow function possible to detect only with =&gt; on same line
44054401
(

0 commit comments

Comments
 (0)