Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

enh(typescript) add support for satisfies keyword #4058

Merged
merged 1 commit into from
May 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -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][]
Expand Down Expand Up @@ -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
Expand Down
3 changes: 2 additions & 1 deletion src/languages/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ export default function(hljs) {
"abstract",
"readonly",
"enum",
"override"
"override",
"satisfies"
];

/*
Expand Down
2 changes: 2 additions & 0 deletions test/markup/typescript/satisfies-and-as.expect.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<span class="hljs-keyword">const</span> test3 = <span class="hljs-string">&#x27;test3&#x27;</span> <span class="hljs-keyword">as</span> <span class="hljs-title class_">ValidName</span>
<span class="hljs-keyword">const</span> test4 = <span class="hljs-string">&#x27;test4&#x27;</span> <span class="hljs-keyword">satisfies</span> <span class="hljs-title class_">ValidName</span>
2 changes: 2 additions & 0 deletions test/markup/typescript/satisfies-and-as.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
const test3 = 'test3' as ValidName
const test4 = 'test4' satisfies ValidName
Loading