From ef24c633f6945e87e8d5717d146ad6601cd7e99f Mon Sep 17 00:00:00 2001 From: Raymond Ha Date: Thu, 24 Nov 2022 11:12:38 -0800 Subject: highlights(typescript): Fix as highlight --- queries/typescript/highlights.scm | 2 ++ tests/query/highlights/typescript/as.ts | 8 ++++++++ 2 files changed, 10 insertions(+) create mode 100644 tests/query/highlights/typescript/as.ts diff --git a/queries/typescript/highlights.scm b/queries/typescript/highlights.scm index 82151ef40..3df859058 100644 --- a/queries/typescript/highlights.scm +++ b/queries/typescript/highlights.scm @@ -17,6 +17,8 @@ "satisfies" ] @keyword +(as_expression "as" @keyword) + ; types (type_identifier) @type diff --git a/tests/query/highlights/typescript/as.ts b/tests/query/highlights/typescript/as.ts new file mode 100644 index 000000000..b1f1533b4 --- /dev/null +++ b/tests/query/highlights/typescript/as.ts @@ -0,0 +1,8 @@ +import * as foo from 'foo'; +// ^ include + +export { foo as bar }; +// ^ include + +const n = 5 as number; +// ^ keyword -- cgit v1.2.3-70-g09d2