Skip to content

Commit

Permalink
Support for named tuple added as part of microsoft/TypeScript#38234
Browse files Browse the repository at this point in the history
  • Loading branch information
sheetalkamat committed May 21, 2020
1 parent 84422d9 commit fa4e0d3
Show file tree
Hide file tree
Showing 5 changed files with 1,197 additions and 0 deletions.
7 changes: 7 additions & 0 deletions TypeScript.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -2332,6 +2332,13 @@ repository:
endCaptures:
'0': { name: meta.brace.square.ts }
patterns:
- name: keyword.operator.rest.ts
match: \.\.\.
- match: '{{startOfIdentifier}}({{identifier}})\s*(\?)?\s*(:)'
captures:
'1': { name: entity.name.label.ts }
'2': { name: keyword.operator.optional.ts }
'3': { name: punctuation.separator.label.ts }
- include: '#type'
- include: '#punctuation-comma'

Expand Down
28 changes: 28 additions & 0 deletions TypeScript.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -7042,6 +7042,34 @@
</dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>keyword.operator.rest.ts</string>
<key>match</key>
<string>\.\.\.</string>
</dict>
<dict>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))([_$[:alpha:]][_$[:alnum:]]*)\s*(\?)?\s*(:)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.label.ts</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.optional.ts</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.separator.label.ts</string>
</dict>
</dict>
</dict>
<dict>
<key>include</key>
<string>#type</string>
Expand Down
28 changes: 28 additions & 0 deletions TypeScriptReact.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -6990,6 +6990,34 @@
</dict>
<key>patterns</key>
<array>
<dict>
<key>name</key>
<string>keyword.operator.rest.tsx</string>
<key>match</key>
<string>\.\.\.</string>
</dict>
<dict>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))([_$[:alpha:]][_$[:alnum:]]*)\s*(\?)?\s*(:)</string>
<key>captures</key>
<dict>
<key>1</key>
<dict>
<key>name</key>
<string>entity.name.label.tsx</string>
</dict>
<key>2</key>
<dict>
<key>name</key>
<string>keyword.operator.optional.tsx</string>
</dict>
<key>3</key>
<dict>
<key>name</key>
<string>punctuation.separator.label.tsx</string>
</dict>
</dict>
</dict>
<dict>
<key>include</key>
<string>#type</string>
Expand Down
Loading

0 comments on commit fa4e0d3

Please sign in to comment.