blob: 96cf9c39e38b16b34113b1e6d9b0b21442e1b46f (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
|
; TypeScript highlights, from tree-sitter/tree-sitter-typescript v0.23.2
; queries/highlights.scm (MIT). A supplement loaded after javascript.scm, as
; upstream composes it, so these patterns win. Upstream's
; ((identifier) @type (#match? "^[A-Z]")) is dropped: javascript.scm already
; paints capitalized identifiers as @constructor, and repainting every one of
; them as a type costs a second regex per identifier for a worse answer.
["abstract" "declare" "enum" "implements" "interface" "keyof" "namespace"
"private" "protected" "public" "type" "readonly" "override"
"satisfies"] @keyword
[(type_identifier) (predefined_type)] @type
(type_arguments "<" @punctuation.bracket ">" @punctuation.bracket)
(required_parameter (identifier) @variable.parameter)
(optional_parameter (identifier) @variable.parameter)
|