diff --git a/CHANGES.md b/CHANGES.md index 14733c1c39..26b9d4b2a4 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -6,6 +6,7 @@ CAVEATS / POTENTIALLY BREAKING CHANGES Core Grammars: +- enh(typescript) add support for `satisfies` operator [Kisaragi Hiu][] - enc(c) added more C23 keywords [Melkor-1][] - enh(json) added jsonc as an alias [BackupMiles][] - enh(gml) updated to latest language version (GML v2024.2) [gnysek][] @@ -64,6 +65,7 @@ Themes: - Added `1c-light` theme a like in the IDE 1C:Enterprise 8 (for 1c) [Vitaly Barilko][] +[Kisaragi Hiu]: https://github.com/kisaragi-hiu [Melkor-1]: https://github.com/Melkor-1 [PeteLomax]: https://github.com/petelomax [gnysek]: https://github.com/gnysek diff --git a/src/languages/typescript.js b/src/languages/typescript.js index 4e818849c8..37a46ad34f 100644 --- a/src/languages/typescript.js +++ b/src/languages/typescript.js @@ -65,7 +65,8 @@ export default function(hljs) { "abstract", "readonly", "enum", - "override" + "override", + "satisfies" ]; /* diff --git a/test/markup/typescript/satisfies-and-as.expect.txt b/test/markup/typescript/satisfies-and-as.expect.txt new file mode 100644 index 0000000000..40309973e2 --- /dev/null +++ b/test/markup/typescript/satisfies-and-as.expect.txt @@ -0,0 +1,2 @@ +const test3 = 'test3' as ValidName +const test4 = 'test4' satisfies ValidName diff --git a/test/markup/typescript/satisfies-and-as.txt b/test/markup/typescript/satisfies-and-as.txt new file mode 100644 index 0000000000..2e05c74420 --- /dev/null +++ b/test/markup/typescript/satisfies-and-as.txt @@ -0,0 +1,2 @@ +const test3 = 'test3' as ValidName +const test4 = 'test4' satisfies ValidName