diff options
| -rw-r--r-- | queries/typescript/highlights.scm | 2 | ||||
| -rw-r--r-- | tests/query/highlights/typescript/as.ts | 8 |
2 files changed, 10 insertions, 0 deletions
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 |
