File tree Expand file tree Collapse file tree 5 files changed +1202
-0
lines changed Expand file tree Collapse file tree 5 files changed +1202
-0
lines changed Original file line number Diff line number Diff line change @@ -504,6 +504,7 @@ repository:
504
504
- include : ' #comment'
505
505
- include : ' #method-declaration'
506
506
- include : ' #indexer-declaration'
507
+ - include : ' #indexer-mapped-type-declaration'
507
508
- include : ' #field-declaration'
508
509
- include : ' #type-annotation'
509
510
- begin : \.\.\.
@@ -617,6 +618,21 @@ repository:
617
618
patterns :
618
619
- include : ' #type-annotation'
619
620
621
+ indexer-mapped-type-declaration :
622
+ name : meta.indexer.mappedtype.declaration.ts
623
+ begin : (?:(?<!\.|\$)\b(readonly)\s*)?(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+
624
+ beginCaptures :
625
+ ' 1 ' : { name: storage.modifier.ts }
626
+ ' 2 ' : { name: meta.brace.square.ts }
627
+ ' 3 ' : { name: entity.name.type.ts }
628
+ ' 4 ' : { name: keyword.operator.expression.in.ts }
629
+ end : (\])\s*(\?\s*)?|$
630
+ endCaptures :
631
+ ' 1 ' : { name: meta.brace.square.ts }
632
+ ' 2 ' : { name: keyword.operator.optional.ts }
633
+ patterns :
634
+ - include : ' #type'
635
+
620
636
function-declaration :
621
637
name : meta.function.ts
622
638
begin : (?<!\.|\$)\b(?:(export)\s+)?(?:(async)\s+)?(function\b)(?:\s*(\*))?(?:(?:\s+|(?<=\*))([_$[:alpha:]][_$[:alnum:]]*))?\s*
Original file line number Diff line number Diff line change 1591
1591
<key >include </key >
1592
1592
<string >#indexer-declaration </string >
1593
1593
</dict >
1594
+ <dict >
1595
+ <key >include </key >
1596
+ <string >#indexer-mapped-type-declaration </string >
1597
+ </dict >
1594
1598
<dict >
1595
1599
<key >include </key >
1596
1600
<string >#field-declaration </string >
1904
1908
</dict >
1905
1909
</array >
1906
1910
</dict >
1911
+ <key >indexer-mapped-type-declaration </key >
1912
+ <dict >
1913
+ <key >name </key >
1914
+ <string >meta.indexer.mappedtype.declaration.ts </string >
1915
+ <key >begin </key >
1916
+ <string >(?:(?< !\.|\$)\b(readonly)\s*)?(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+ </string >
1917
+ <key >beginCaptures </key >
1918
+ <dict >
1919
+ <key >1 </key >
1920
+ <dict >
1921
+ <key >name </key >
1922
+ <string >storage.modifier.ts </string >
1923
+ </dict >
1924
+ <key >2 </key >
1925
+ <dict >
1926
+ <key >name </key >
1927
+ <string >meta.brace.square.ts </string >
1928
+ </dict >
1929
+ <key >3 </key >
1930
+ <dict >
1931
+ <key >name </key >
1932
+ <string >entity.name.type.ts </string >
1933
+ </dict >
1934
+ <key >4 </key >
1935
+ <dict >
1936
+ <key >name </key >
1937
+ <string >keyword.operator.expression.in.ts </string >
1938
+ </dict >
1939
+ </dict >
1940
+ <key >end </key >
1941
+ <string >(\])\s*(\?\s*)?|$ </string >
1942
+ <key >endCaptures </key >
1943
+ <dict >
1944
+ <key >1 </key >
1945
+ <dict >
1946
+ <key >name </key >
1947
+ <string >meta.brace.square.ts </string >
1948
+ </dict >
1949
+ <key >2 </key >
1950
+ <dict >
1951
+ <key >name </key >
1952
+ <string >keyword.operator.optional.ts </string >
1953
+ </dict >
1954
+ </dict >
1955
+ <key >patterns </key >
1956
+ <array >
1957
+ <dict >
1958
+ <key >include </key >
1959
+ <string >#type </string >
1960
+ </dict >
1961
+ </array >
1962
+ </dict >
1907
1963
<key >function-declaration </key >
1908
1964
<dict >
1909
1965
<key >name </key >
Original file line number Diff line number Diff line change 1595
1595
<key >include </key >
1596
1596
<string >#indexer-declaration </string >
1597
1597
</dict >
1598
+ <dict >
1599
+ <key >include </key >
1600
+ <string >#indexer-mapped-type-declaration </string >
1601
+ </dict >
1598
1602
<dict >
1599
1603
<key >include </key >
1600
1604
<string >#field-declaration </string >
1908
1912
</dict >
1909
1913
</array >
1910
1914
</dict >
1915
+ <key >indexer-mapped-type-declaration </key >
1916
+ <dict >
1917
+ <key >name </key >
1918
+ <string >meta.indexer.mappedtype.declaration.tsx </string >
1919
+ <key >begin </key >
1920
+ <string >(?:(?< !\.|\$)\b(readonly)\s*)?(\[)\s*([_$[:alpha:]][_$[:alnum:]]*)\s+(in)\s+ </string >
1921
+ <key >beginCaptures </key >
1922
+ <dict >
1923
+ <key >1 </key >
1924
+ <dict >
1925
+ <key >name </key >
1926
+ <string >storage.modifier.tsx </string >
1927
+ </dict >
1928
+ <key >2 </key >
1929
+ <dict >
1930
+ <key >name </key >
1931
+ <string >meta.brace.square.tsx </string >
1932
+ </dict >
1933
+ <key >3 </key >
1934
+ <dict >
1935
+ <key >name </key >
1936
+ <string >entity.name.type.tsx </string >
1937
+ </dict >
1938
+ <key >4 </key >
1939
+ <dict >
1940
+ <key >name </key >
1941
+ <string >keyword.operator.expression.in.tsx </string >
1942
+ </dict >
1943
+ </dict >
1944
+ <key >end </key >
1945
+ <string >(\])\s*(\?\s*)?|$ </string >
1946
+ <key >endCaptures </key >
1947
+ <dict >
1948
+ <key >1 </key >
1949
+ <dict >
1950
+ <key >name </key >
1951
+ <string >meta.brace.square.tsx </string >
1952
+ </dict >
1953
+ <key >2 </key >
1954
+ <dict >
1955
+ <key >name </key >
1956
+ <string >keyword.operator.optional.tsx </string >
1957
+ </dict >
1958
+ </dict >
1959
+ <key >patterns </key >
1960
+ <array >
1961
+ <dict >
1962
+ <key >include </key >
1963
+ <string >#type </string >
1964
+ </dict >
1965
+ </array >
1966
+ </dict >
1911
1967
<key >function-declaration </key >
1912
1968
<dict >
1913
1969
<key >name </key >
You can’t perform that action at this time.
0 commit comments