2021-03-09 23:14:27 +01:00
|
|
|
; inherits: ecma
|
2020-06-12 07:41:20 -05:00
|
|
|
[
|
|
|
|
|
"abstract"
|
|
|
|
|
"declare"
|
|
|
|
|
"enum"
|
|
|
|
|
"export"
|
|
|
|
|
"implements"
|
|
|
|
|
"interface"
|
|
|
|
|
"keyof"
|
|
|
|
|
"namespace"
|
|
|
|
|
"private"
|
|
|
|
|
"protected"
|
|
|
|
|
"public"
|
|
|
|
|
"type"
|
2021-03-07 18:59:39 +01:00
|
|
|
"readonly"
|
2020-06-12 07:41:20 -05:00
|
|
|
] @keyword
|
|
|
|
|
|
2020-11-14 18:44:55 -05:00
|
|
|
; types
|
|
|
|
|
|
2020-06-12 07:41:20 -05:00
|
|
|
(type_identifier) @type
|
|
|
|
|
(predefined_type) @type.builtin
|
|
|
|
|
|
2020-11-14 18:44:55 -05:00
|
|
|
; punctuation
|
|
|
|
|
|
2020-06-12 07:41:20 -05:00
|
|
|
(type_arguments
|
|
|
|
|
"<" @punctuation.bracket
|
|
|
|
|
">" @punctuation.bracket)
|
|
|
|
|
|
2020-11-14 19:02:20 -05:00
|
|
|
(union_type
|
|
|
|
|
"|" @punctuation.delimiter)
|
|
|
|
|
|
|
|
|
|
(intersection_type
|
|
|
|
|
"&" @punctuation.delimiter)
|
|
|
|
|
|
2020-11-14 18:44:55 -05:00
|
|
|
(type_annotation
|
|
|
|
|
":" @punctuation.delimiter)
|
|
|
|
|
|
|
|
|
|
(pair
|
|
|
|
|
":" @punctuation.delimiter)
|
|
|
|
|
|
2020-11-21 11:48:58 -05:00
|
|
|
(property_signature "?" @punctuation.special)
|
|
|
|
|
(optional_parameter "?" @punctuation.special)
|
2020-11-14 19:02:20 -05:00
|
|
|
|
2020-06-12 07:41:20 -05:00
|
|
|
; Variables
|
|
|
|
|
|
2020-11-14 18:44:55 -05:00
|
|
|
(undefined) @variable.builtin
|
|
|
|
|
|
2020-09-06 09:11:54 -05:00
|
|
|
(required_parameter (identifier) @parameter)
|
|
|
|
|
(optional_parameter (identifier) @parameter)
|