Skip to content

Parse reserved identifiers as dotted names of ambient modules #55282

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

Andarist
Copy link
Contributor

@Andarist Andarist commented Aug 6, 2023

fixes #7840

@typescript-bot typescript-bot added the For Backlog Bug PRs that fix a backlog bug label Aug 6, 2023
@sandersn sandersn self-assigned this Aug 24, 2023
Copy link
Member

@sandersn sandersn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we really need this fix? Namespaces are rarely written these days -- they're still automatically generated but I don't think this fix will make a difference there. And there's a well-understood workaround available.

==== ambientModuleDeclarationWithReservedIdentifierInDottedPath.ts (4 errors) ====
// https://github.com/microsoft/TypeScript/issues/7840

declare module chrome.debugger {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we haven't (yet) deprecated the module keyword, but please use declare namespace for new tests

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While the syntax is supported - shouldn't I add extra tests with declare namespace instead of changing this one?

@sandersn sandersn merged commit fe70ec9 into microsoft:main Aug 28, 2023
@Andarist Andarist deleted the fix/parse-reserved-identifiers-in-declared-dotted-names branch August 28, 2023 22:22
snovader pushed a commit to EG-A-S/TypeScript that referenced this pull request Sep 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
For Backlog Bug PRs that fix a backlog bug
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Should be able to declare dotted name with debugger
4 participants