-
Notifications
You must be signed in to change notification settings - Fork 12.9k
fix: diagnostic message for class name 'Object' when targeting different ECMAScript versions #61358
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
Conversation
…ent ECMAScript versions
…20250306202248269 to main (microsoft#61368)
…ns group (microsoft#61387) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…d." error with jsdoc @import syntax (microsoft#60921)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Daniel Rosenwasser <DanielRosenwasser@users.noreply.github.com>
…ns group (microsoft#61509) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…ft#52723) Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
…osoft#61601) Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com>
…20250604192236101 to main (microsoft#61815)
Co-authored-by: Ujjwal Sharma <ryzokuken@disroot.org> Co-authored-by: Nicolò Ribaudo <hell@nicr.dev>
Co-authored-by: Jake Bailey <5341706+jakebailey@users.noreply.github.com>
…lock-scoped variables in presence of parse errors (microsoft#61824)
src/compiler/types.ts
Outdated
@@ -7598,7 +7598,7 @@ export const enum ScriptKind { | |||
// June of each year. This includes changes to `LanguageFeatureMinimumTarget`, `ScriptTarget`, | |||
// `ScriptTargetFeatures` transformers/esnext.ts, compiler/commandLineParser.ts, | |||
// compiler/utilitiesPublic.ts, and the contents of each lib/esnext.*.d.ts file. | |||
export const enum ScriptTarget { | |||
export enum ScriptTarget { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be changed.
src/compiler/checker.ts
Outdated
error( | ||
name, | ||
Diagnostics.Class_name_cannot_be_Object_when_targeting_0_with_module_1, | ||
ScriptTarget[languageVersion], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't be using reverse mapping to find the names of language versions, as this depends on how the enum is defined and will break if two things alias each other. We should have some other standard way to print out target kinds like this.
I'd personally suggest just making the message say "ES5 and above".
…20250611192551558 to main (microsoft#61846)
…ent ECMAScript versions
…into idango/61270
…geting ES5 and above
It looks like you've sent a pull request to update some generated declaration files related to the DOM. These files aren't meant to be edited by hand, as they are synchronized with files in the TypeScript-DOM-lib-generator repository. You can read more here. For house-keeping purposes, this pull request will be closed. |
Sorry for the rebase flop 😅 |
Fixes: #61270