File tree Expand file tree Collapse file tree 4 files changed +15
-41
lines changed Expand file tree Collapse file tree 4 files changed +15
-41
lines changed Original file line number Diff line number Diff line change @@ -45,17 +45,14 @@ 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*
48
+ begin : \b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s*
49
49
beginCaptures :
50
50
' 1 ' : { name: keyword.other.ts }
51
51
' 2 ' : { name: storage.type.ts }
52
- end : (?=[,);>]|var|type|function|class|interface)
52
+ end : (?=$| [,);>]|var|type|function|class|interface)
53
53
patterns :
54
- - include : ' #type-parameters'
55
- - name : keyword.operator.ts
56
- match : ' =\s*'
57
54
- include : ' #type'
58
-
55
+
59
56
enum-declaration :
60
57
name : meta.enum.declaration.ts
61
58
match : (?:\b(const)\s+)?\b(enum)\s+([a-zA-Z_$][\w$]*)
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* </string >
1489
+ <string >\b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s* </string >
1490
1490
<key >beginCaptures </key >
1491
1491
<dict >
1492
1492
<key >1 </key >
1501
1501
</dict >
1502
1502
</dict >
1503
1503
<key >end </key >
1504
- <string >(?=[,);> ]|var|type|function|class|interface) </string >
1504
+ <string >(?=$| [,);> ]|var|type|function|class|interface) </string >
1505
1505
<key >name </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 >
1519
1509
<dict >
1520
1510
<key >include </key >
1521
1511
<string >#type </string >
Original file line number Diff line number Diff line change @@ -46,16 +46,13 @@ repository:
46
46
- include : ' #enum-declaration'
47
47
48
48
type-declaration :
49
- name : meta.type.declaration.ts
50
- begin : \b(type)\b\s+([a-zA-Z_$][\w$]*)\s*
49
+ name : meta.type.declaration.tsx
50
+ begin : \b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\s*
51
51
beginCaptures :
52
- ' 1 ' : { name: keyword.other.ts }
53
- ' 2 ' : { name: storage.type.ts }
54
- end : (?=[,);>]|var|type|function|class|interface)
52
+ ' 1 ' : { name: keyword.other.tsx }
53
+ ' 2 ' : { name: storage.type.tsx }
54
+ end : (?=$| [,);>]|var|type|function|class|interface)
55
55
patterns :
56
- - include : ' #type-parameters'
57
- - name : keyword.operator.ts
58
- match : ' =\s*'
59
56
- include : ' #type'
60
57
61
58
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* </string >
1855
+ <string >\b(type)\b\s+([a-zA-Z_$][\w$]*)\s*=\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.ts </string >
1861
+ <string >keyword.other.tsx </string >
1862
1862
</dict >
1863
1863
<key >2 </key >
1864
1864
<dict >
1865
1865
<key >name </key >
1866
- <string >storage.type.ts </string >
1866
+ <string >storage.type.tsx </string >
1867
1867
</dict >
1868
1868
</dict >
1869
1869
<key >end </key >
1870
- <string >(?=[,);> ]|var|type|function|class|interface) </string >
1870
+ <string >(?=$| [,);> ]|var|type|function|class|interface) </string >
1871
1871
<key >name </key >
1872
- <string >meta.type.declaration.ts </string >
1872
+ <string >meta.type.declaration.tsx </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 >
1885
1875
<dict >
1886
1876
<key >include </key >
1887
1877
<string >#type </string >
You can’t perform that action at this time.
0 commit comments