Skip to content

Commit

Permalink
Support for infer types
Browse files Browse the repository at this point in the history
  • Loading branch information
sheetalkamat committed Feb 9, 2018
1 parent 24c7fb5 commit 77d21fd
Show file tree
Hide file tree
Showing 5 changed files with 462 additions and 0 deletions.
2 changes: 2 additions & 0 deletions TypeScript.YAML-tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -1883,6 +1883,8 @@ repository:
match: '{{startOfIdentifier}}keyof{{endOfIdentifier}}'
- name: keyword.operator.ternary.ts
match: (\?|\:)
- name: keyword.operator.expression.infer.ts
match: '{{startOfIdentifier}}infer(?=\s+[_$[:alpha:]])'

type-predicate-operator:
name: keyword.operator.expression.is.ts
Expand Down
6 changes: 6 additions & 0 deletions TypeScript.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -5324,6 +5324,12 @@
<key>match</key>
<string>(\?|\:)</string>
</dict>
<dict>
<key>name</key>
<string>keyword.operator.expression.infer.ts</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))infer(?=\s+[_$[:alpha:]])</string>
</dict>
</array>
</dict>
<key>type-predicate-operator</key>
Expand Down
6 changes: 6 additions & 0 deletions TypeScriptReact.tmLanguage
Original file line number Diff line number Diff line change
Expand Up @@ -5270,6 +5270,12 @@
<key>match</key>
<string>(\?|\:)</string>
</dict>
<dict>
<key>name</key>
<string>keyword.operator.expression.infer.tsx</string>
<key>match</key>
<string>(?&lt;![_$[:alnum:]])(?:(?&lt;=\.\.\.)|(?&lt;!\.))infer(?=\s+[_$[:alpha:]])</string>
</dict>
</array>
</dict>
<key>type-predicate-operator</key>
Expand Down

0 comments on commit 77d21fd

Please sign in to comment.