-
Notifications
You must be signed in to change notification settings - Fork 222
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
enable erasableSyntaxOnly with TypeScript 5.8 (#10916)
_evergreen_ ## Description [TypeScript 5.8 beta](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/) adds an [erasableSyntaxOnly](https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option) option. This bumps the TypeScript dependency so we can use that option and adopts it. ### Security Considerations none ### Scaling Considerations none ### Documentation Considerations none ### Testing Considerations I added non-erasable syntax locally to verify it errors: ``` src/types.ts:10:6 - error TS1294: This syntax is not allowed when 'erasableSyntaxOnly' is enabled. 10 enum Foo {} ``` EDIT: also [test: erasureSyntaxOnly regression](2d784cf) ### Upgrade Considerations none
- Loading branch information
Showing
7 changed files
with
44 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// NB: not a test that runs. | ||
|
||
// Test the `--erasureSyntaxOnly` option of TypeScript 5.8 | ||
// https://devblogs.microsoft.com/typescript/announcing-typescript-5-8-beta/#the---erasablesyntaxonly-option | ||
|
||
// @ts-expect-error ts(1294) This syntax is not allowed when 'erasableSyntaxOnly' is enabled. | ||
enum Foo { | ||
A = 1, | ||
B = 2, | ||
C = 3, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12289,7 +12289,7 @@ typescript-eslint@^7.3.1, typescript-eslint@^8.14.0, typescript-eslint@^8.22.0: | |
"@typescript-eslint/parser" "8.22.0" | ||
"@typescript-eslint/utils" "8.22.0" | ||
|
||
"[email protected] - 5.7.x", typescript@^5.4.5, typescript@~5.7.1, typescript@~5.7.3: | ||
"[email protected] - 5.7.x", typescript@^5.4.5: | ||
version "5.7.3" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.7.3.tgz#919b44a7dbb8583a9b856d162be24a54bf80073e" | ||
integrity sha512-84MVSjMEHP+FQRPy3pX9sTVV/INIex71s9TL2Gm5FG/WG1SqXeKyZ0k7/blY/4FdOzI12CBy1vGc4og/eus0fw== | ||
|
@@ -12299,6 +12299,11 @@ typescript-eslint@^7.3.1, typescript-eslint@^8.14.0, typescript-eslint@^8.22.0: | |
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" | ||
integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== | ||
|
||
typescript@^5.8.0-beta, typescript@~5.8.0-beta: | ||
version "5.8.0-dev.20250130" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.8.0-dev.20250130.tgz#eede4cf5d813f9845c6ee2b508d2392d544cb76e" | ||
integrity sha512-qeH56cqOnOE0NO4zUsuuc5kyIQlzOPurHcguomUpSTfUE2He5dABg+fBBUeYIf4MreflM6ArXyj/rIrcHQ5g0g== | ||
|
||
typescript@~5.6.3: | ||
version "5.6.3" | ||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.6.3.tgz#5f3449e31c9d94febb17de03cc081dd56d81db5b" | ||
|