diff --git a/CHANGELOG.md b/CHANGELOG.md index 052b5a4325..4236667e4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,7 @@ - Update `Command Help` syntax, see #2255 - `Julia`: Fix syntax highlighting for function name starting with `struct`, see #2230 - Minor update to `LiveScript`, see #2291 +- Associate `.mts` and `.cts` files with the `TypeScript` syntax. See #2236 (@kidonng) ## Themes diff --git a/assets/syntaxes/02_Extra/TypeScript.sublime-syntax b/assets/syntaxes/02_Extra/TypeScript.sublime-syntax index 251ca42efc..68c9b4a942 100644 --- a/assets/syntaxes/02_Extra/TypeScript.sublime-syntax +++ b/assets/syntaxes/02_Extra/TypeScript.sublime-syntax @@ -4,6 +4,8 @@ name: TypeScript file_extensions: - ts + - mts + - cts scope: source.ts contexts: main: diff --git a/tests/syntax-tests/highlighted/TypeScript/example.cts b/tests/syntax-tests/highlighted/TypeScript/example.cts new file mode 100644 index 0000000000..1c1541551b --- /dev/null +++ b/tests/syntax-tests/highlighted/TypeScript/example.cts @@ -0,0 +1 @@ +const dummy: string = "Regression test for https://github.com/sharkdp/bat/pull/2236"; diff --git a/tests/syntax-tests/source/TypeScript/example.cts b/tests/syntax-tests/source/TypeScript/example.cts new file mode 100644 index 0000000000..fac531af62 --- /dev/null +++ b/tests/syntax-tests/source/TypeScript/example.cts @@ -0,0 +1 @@ +const dummy: string = "Regression test for https://github.com/sharkdp/bat/pull/2236";