fix: diagnostic message for class name 'Object' when targeting different ECMAScript versions#61358
Closed
idango10 wants to merge 60 commits intomicrosoft:mainfrom
idango10:idango/61270
Closed
fix: diagnostic message for class name 'Object' when targeting different ECMAScript versions#61358idango10 wants to merge 60 commits intomicrosoft:mainfrom idango10:idango/61270
idango10 wants to merge 60 commits intomicrosoft:mainfrom
idango10:idango/61270
Conversation
…ent ECMAScript versions
…20250306202248269 to main (#61368)
…ns group (#61387) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
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 (#61509) Signed-off-by: dependabot[bot] <support@github.com> 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: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Nathan Shively-Sanders <293473+sandersn@users.noreply.github.com> Co-authored-by: Jake Bailey <5341706+jakebailey@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>
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 (#61824)
jakebailey
requested changes
Jun 11, 2025
src/compiler/types.ts
Outdated
| // `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 { |
src/compiler/checker.ts
Outdated
| error( | ||
| name, | ||
| Diagnostics.Class_name_cannot_be_Object_when_targeting_0_with_module_1, | ||
| ScriptTarget[languageVersion], |
Member
There was a problem hiding this comment.
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 (#61846)
…ent ECMAScript versions
…into idango/61270
…geting ES5 and above
Collaborator
|
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. |
Contributor
Author
|
Sorry for the rebase flop 😅 |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes: #61270