Skip to content
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

Allow references to the global Symbol in computed property names under isolatedDeclarations #58771

Conversation

weswigham
Copy link
Member

Specifically, they must look like Symbol.something or globalThis.Symbol.something, and in the first case, that first identifier must refer exactly to the global Symbol value (or not resolve at all, in which case it's the missing global by default). In the second, globalThis must exactly refer to the global globalThis.

This should allow the common cases like Symbol.iterator members and the like, without allowing complicated ones that might not be right like imports that refer to arbitrary maybe-symbol names.

@weswigham weswigham requested a review from jakebailey June 4, 2024 17:22
@typescript-bot typescript-bot added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jun 4, 2024
@weswigham weswigham merged commit 112e860 into microsoft:main Jun 4, 2024
28 checks passed
@jakebailey
Copy link
Member

Is this something we should backport to 5.5?

@MichaelMitchell-at
Copy link

sogood

@MichaelMitchell-at
Copy link

Is this something we should backport to 5.5?

Perhaps in 5.5.4?

Also we just stumbled on some code today that could really use something like #58829, since it uses custom created unique symbols

@DanielRosenwasser
Copy link
Member

I'll discuss with others whether it's a good idea to backport, but in the meantime let's just kick it off.

@typescript-bot cherry-pick this to release-5.5

@typescript-bot
Copy link
Collaborator

typescript-bot commented Jul 21, 2024

Starting jobs; this comment will be updated as builds start and complete.

Command Status Results
cherry-pick this to release-5.5 ✅ Started ✅ Results

@typescript-bot
Copy link
Collaborator

Hey, @DanielRosenwasser! I've created #59378 for you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants