File tree Expand file tree Collapse file tree 4 files changed +36
-10
lines changed Expand file tree Collapse file tree 4 files changed +36
-10
lines changed Original file line number Diff line number Diff line change @@ -45,12 +45,15 @@ repository:
45
45
46
46
type-declaration :
47
47
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*
49
49
beginCaptures :
50
50
' 1 ' : { name: keyword.other.ts }
51
51
' 2 ' : { name: storage.type.ts }
52
52
end : (?=$|[,);>]|var|type|function|class|interface)
53
53
patterns :
54
+ - include : ' #type-parameters'
55
+ - name : keyword.operator.ts
56
+ match : ' =\s*'
54
57
- include : ' #type'
55
58
56
59
enum-declaration :
Original file line number Diff line number Diff line change 1486
1486
<key >type-declaration </key >
1487
1487
<dict >
1488
1488
<key >begin </key >
1489
- <string >\b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s* </string >
1489
+ <string >\b(type)\b\s+([a-zA-Z_$][\w$]*)\s* </string >
1490
1490
<key >beginCaptures </key >
1491
1491
<dict >
1492
1492
<key >1 </key >
1506
1506
<string >meta.type.declaration.ts </string >
1507
1507
<key >patterns </key >
1508
1508
<array >
1509
+ <dict >
1510
+ <key >include </key >
1511
+ <string >#type-parameters </string >
1512
+ </dict >
1513
+ <dict >
1514
+ <key >match </key >
1515
+ <string >=\s* </string >
1516
+ <key >name </key >
1517
+ <string >keyword.operator.ts </string >
1518
+ </dict >
1509
1519
<dict >
1510
1520
<key >include </key >
1511
1521
<string >#type </string >
Original file line number Diff line number Diff line change @@ -46,13 +46,16 @@ repository:
46
46
- include : ' #enum-declaration'
47
47
48
48
type-declaration :
49
- name : meta.type.declaration.tsx
50
- begin : \b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s*
49
+ name : meta.type.declaration.ts
50
+ begin : \b(type)\b\s+([a-zA-Z_$][\w$]*)\s*
51
51
beginCaptures :
52
- ' 1 ' : { name: keyword.other.tsx }
53
- ' 2 ' : { name: storage.type.tsx }
52
+ ' 1 ' : { name: keyword.other.ts }
53
+ ' 2 ' : { name: storage.type.ts }
54
54
end : (?=$|[,);>]|var|type|function|class|interface)
55
55
patterns :
56
+ - include : ' #type-parameters'
57
+ - name : keyword.operator.ts
58
+ match : ' =\s*'
56
59
- include : ' #type'
57
60
58
61
enum-declaration :
Original file line number Diff line number Diff line change 1852
1852
<key >type-declaration </key >
1853
1853
<dict >
1854
1854
<key >begin </key >
1855
- <string >\b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s* </string >
1855
+ <string >\b(type)\b\s+([a-zA-Z_$][\w$]*)\s* </string >
1856
1856
<key >beginCaptures </key >
1857
1857
<dict >
1858
1858
<key >1 </key >
1859
1859
<dict >
1860
1860
<key >name </key >
1861
- <string >keyword.other.tsx </string >
1861
+ <string >keyword.other.ts </string >
1862
1862
</dict >
1863
1863
<key >2 </key >
1864
1864
<dict >
1865
1865
<key >name </key >
1866
- <string >storage.type.tsx </string >
1866
+ <string >storage.type.ts </string >
1867
1867
</dict >
1868
1868
</dict >
1869
1869
<key >end </key >
1870
1870
<string >(?=$|[,);> ]|var|type|function|class|interface) </string >
1871
1871
<key >name </key >
1872
- <string >meta.type.declaration.tsx </string >
1872
+ <string >meta.type.declaration.ts </string >
1873
1873
<key >patterns </key >
1874
1874
<array >
1875
+ <dict >
1876
+ <key >include </key >
1877
+ <string >#type-parameters </string >
1878
+ </dict >
1879
+ <dict >
1880
+ <key >match </key >
1881
+ <string >=\s* </string >
1882
+ <key >name </key >
1883
+ <string >keyword.operator.ts </string >
1884
+ </dict >
1875
1885
<dict >
1876
1886
<key >include </key >
1877
1887
<string >#type </string >
You can’t perform that action at this time.
0 commit comments