Skip to content

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
@jakebailey
Copy link
Member

Is this something we should backport to 5.5?

@MichaelMitchell-at
Copy link
Contributor

sogood

@MichaelMitchell-at
Copy link
Contributor

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.

DanielRosenwasser pushed a commit that referenced this pull request Jul 22, 2024
…e-5.5 (#59378)

Co-authored-by: Wesley Wigham <wewigham@microsoft.com>
kdy1 pushed a commit to swc-project/swc that referenced this pull request Jan 23, 2025
…operty names under `isolatedDeclarations` (#9869)

fixes #9859
ref: microsoft/TypeScript#58771

Pass `unresolved_mark` to FastDts so it can check whether a `Symbol` ident refs to global Symbol.
@microsoft microsoft locked as resolved and limited conversation to collaborators Oct 16, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

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