Skip to content

Commit 168b7e0

Browse files
committed
fixes for issues 89 and 63
1 parent 97fdfc1 commit 168b7e0

File tree

2 files changed

+17
-14
lines changed

2 files changed

+17
-14
lines changed

TypeScript.YAML-tmLanguage

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,15 @@ repository:
4545

4646
type-declaration:
4747
name: meta.type.declaration.ts
48-
begin: \b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s*
48+
begin: \b(type)\b\s+([a-zA-Z_$][\w$]*)\s*
4949
beginCaptures:
5050
'1': { name: keyword.other.ts }
5151
'2': { name: storage.type.ts }
5252
end: (?=$|[,);>]|var|type|function|class|interface)
5353
patterns:
54+
- include: '#type-parameters'
55+
- name: keyword.operator.ts
56+
match: '=\s*'
5457
- include: '#type'
5558

5659
enum-declaration:
@@ -89,9 +92,7 @@ repository:
8992
begin: '(?:\b(extends|implements))'
9093
beginCaptures:
9194
'1': { name: keyword.other.ts }
92-
end: (?=\{)
93-
endCaptures:
94-
'1': { name: brace.curly.ts }
95+
end: \b
9596
patterns:
9697
- include: '#comment'
9798
- include: '#object-heritage'

TypeScript.tmLanguage

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1008,15 +1008,7 @@
10081008
</dict>
10091009
</dict>
10101010
<key>end</key>
1011-
<string>(?=\{)</string>
1012-
<key>endCaptures</key>
1013-
<dict>
1014-
<key>1</key>
1015-
<dict>
1016-
<key>name</key>
1017-
<string>brace.curly.ts</string>
1018-
</dict>
1019-
</dict>
1011+
<string>\b</string>
10201012
<key>name</key>
10211013
<string>meta.object.heritage.ts</string>
10221014
<key>patterns</key>
@@ -1486,7 +1478,7 @@
14861478
<key>type-declaration</key>
14871479
<dict>
14881480
<key>begin</key>
1489-
<string>\b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s*</string>
1481+
<string>\b(type)\b\s+([a-zA-Z_$][\w$]*)\s*</string>
14901482
<key>beginCaptures</key>
14911483
<dict>
14921484
<key>1</key>
@@ -1506,6 +1498,16 @@
15061498
<string>meta.type.declaration.ts</string>
15071499
<key>patterns</key>
15081500
<array>
1501+
<dict>
1502+
<key>include</key>
1503+
<string>#type-parameters</string>
1504+
</dict>
1505+
<dict>
1506+
<key>match</key>
1507+
<string>=\s*</string>
1508+
<key>name</key>
1509+
<string>keyword.operator.ts</string>
1510+
</dict>
15091511
<dict>
15101512
<key>include</key>
15111513
<string>#type</string>

0 commit comments

Comments
 (0)