From 5d59d18d3e6559e525fd933c41070303c5bae32b Mon Sep 17 00:00:00 2001 From: Ananda Umamil Date: Fri, 10 Mar 2023 23:15:19 +0700 Subject: [PATCH] highlights(typescript): `infer`, template literal type & punctuations --- queries/typescript/highlights.scm | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/queries/typescript/highlights.scm b/queries/typescript/highlights.scm index 036b6e8da..057156d55 100644 --- a/queries/typescript/highlights.scm +++ b/queries/typescript/highlights.scm @@ -12,6 +12,7 @@ "override" "satisfies" "module" + "infer" ] @keyword (as_expression "as" @keyword) @@ -35,6 +36,8 @@ ((import_specifier name: (identifier) @type))))) +(template_literal_type) @string + ;; punctuation (type_arguments @@ -55,11 +58,21 @@ (pair ":" @punctuation.delimiter) +(index_signature + ":" @punctuation.delimiter) + +(opting_type_annotation + "?:" @punctuation.delimiter) + "?." @punctuation.delimiter (property_signature "?" @punctuation.special) (optional_parameter "?" @punctuation.special) +(template_type ["${" "}"] @punctuation.special) + +(conditional_type ["?" ":"] @conditional.ternary) + ; Variables (undefined) @variable.builtin