-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
module: add ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX #56610
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2095,11 +2095,13 @@ does not consist of exactly two elements. | |
added: | ||
- v23.0.0 | ||
- v22.10.0 | ||
changes: | ||
- version: REPLACEME | ||
pr-url: https://github.com/nodejs/node/pull/56610 | ||
description: This error is no longer thrown on valid yet unsupported syntax. | ||
--> | ||
|
||
The provided TypeScript syntax is not valid or unsupported. | ||
This could happen when using TypeScript syntax that requires | ||
transformation with [type-stripping][]. | ||
The provided TypeScript syntax is not valid. | ||
|
||
<a id="ERR_INVALID_URI"></a> | ||
|
||
|
@@ -3135,6 +3137,18 @@ try { | |
} | ||
``` | ||
|
||
<a id="ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX"></a> | ||
|
||
### `ERR_UNSUPPORTED_TYPESCRIPT_SYNTAX` | ||
|
||
<!-- YAML | ||
added: REPLACEME | ||
--> | ||
|
||
The provided TypeScript syntax is unsupported. | ||
This could happen when using TypeScript syntax that requires | ||
transformation with [type-stripping][]. | ||
Comment on lines
+3148
to
+3150
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Should we be more explicit and immediately suggest to the user that a potential solution is to run using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Seems like a more forward-looking suggestion would be to suggest they use the TS 5.8 option (once it's out) so they avoid using that syntax in the first place (or perhaps both suggestions) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We could add it in the error message itself? |
||
|
||
<a id="ERR_USE_AFTER_CLOSE"></a> | ||
|
||
### `ERR_USE_AFTER_CLOSE` | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function foo(): string { | ||
await Promise.resolve(1); | ||
} |
Uh oh!
There was an error while loading. Please reload this page.