GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Allow references to the global Symbol in computed property names under isolatedDeclarations by weswigham · Pull Request #58771 · microsoft/TypeScript

Conversation

@weswigham

@weswigham Wesley Wigham (weswigham) commented Jun 4, 2024

Copy link
Copy Markdown
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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@weswigham
Allow references to the global Symbol in computed property names unde…
a333b65
…r isolatedDeclarations
@weswigham
Wesley Wigham (weswigham) requested a review from Jake Bailey (jakebailey) June 4, 2024 17:22
@typescript-bot TypeScript Bot (typescript-bot) assigned Wesley Wigham (weswigham) Jun 4, 2024
@typescript-bot TypeScript Bot (typescript-bot) added Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug labels Jun 4, 2024
jakebailey
Jake Bailey (jakebailey) approved these changes Jun 4, 2024
View reviewed changes
@weswigham
Wesley Wigham (weswigham) merged commit 112e860 into microsoft:main Jun 4, 2024
@jakebailey

Jake Bailey (jakebailey) commented Jun 4, 2024

Copy link
Copy Markdown
Member

Is this something we should backport to 5.5?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MichaelMitchell-at

michaelm (MichaelMitchell-at) commented Jun 4, 2024

Copy link
Copy Markdown
Contributor

sogood

LuiSauter reacted with laugh emoji
All reactions
  • 😄 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@MichaelMitchell-at michaelm (MichaelMitchell-at) mentioned this pull request Jul 2, 2024
isolatedDeclarations does not support well-known symbols as properties oxc-project/oxc#4016
Closed
@MichaelMitchell-at

michaelm (MichaelMitchell-at) commented Jul 17, 2024

Copy link
Copy Markdown
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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DanielRosenwasser

Daniel Rosenwasser (DanielRosenwasser) commented Jul 21, 2024

Copy link
Copy Markdown
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 (@typescript-bot) cherry-pick this to release-5.5

typescript-bot and MichaelMitchell-at reacted with thumbs up emoji
All reactions
  • 👍 2 reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@typescript-bot

TypeScript Bot (typescript-bot) commented Jul 21, 2024 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

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

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@DanielRosenwasser Daniel Rosenwasser (DanielRosenwasser) added this to the TypeScript 5.5.4 milestone Jul 21, 2024
TypeScript Bot (typescript-bot) pushed a commit that referenced this pull request Jul 21, 2024
@weswigham @typescript-bot
Allow references to the global Symbol in computed property names unde…
c266a1e
…r isolatedDeclarations (#58771)
@typescript-bot TypeScript Bot (typescript-bot) mentioned this pull request Jul 21, 2024
🤖 Pick PR #58771 (Allow references to the global Symb...) into release-5.5 #59378
Merged
@typescript-bot

TypeScript Bot (typescript-bot) commented Jul 21, 2024

Copy link
Copy Markdown
Contributor

Hey, Daniel Rosenwasser (@DanielRosenwasser)! I've created #59378 for you.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

Daniel Rosenwasser (DanielRosenwasser) pushed a commit that referenced this pull request Jul 22, 2024
TypeScript Bot @weswigham
🤖 Pick PR #58771 (Allow references to the global Symb...) into releas…
c0ded04
…e-5.5 (#59378)

Co-authored-by: Wesley Wigham <[email protected]>
@dubzzz Nicolas DUBIEN (dubzzz) mentioned this pull request Jul 22, 2024
🔧 Toggle on isolatedDeclarations flag on the project dubzzz/fast-check#5136
Merged
8 tasks done
@MichaelMitchell-at michaelm (MichaelMitchell-at) mentioned this pull request Sep 25, 2024
Computed names in declarations files are resolved even when non-literal, preserve computed names when expressions are entity names #60052
Merged
@CPunisher CPunisher mentioned this pull request Jan 12, 2025
fix(typescript): Allow references to the global Symbol in computed property names under isolatedDeclarations swc-project/swc#9869
Merged
Donny/강동윤 (kdy1) pushed a commit to swc-project/swc that referenced this pull request Jan 23, 2025
@CPunisher
fix(typescript): Allow references to the global Symbol in computed pr…
e4c1e03
…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 (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.

Reviewers

@jakebailey Jake Bailey (jakebailey) jakebailey approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@weswigham Wesley Wigham (weswigham)

Labels

Author: Team For Uncommitted Bug PR for untriaged, rejected, closed or missing bug

Projects

None yet

Milestone

TypeScript 5.5.4

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@weswigham @jakebailey @MichaelMitchell-at @DanielRosenwasser @typescript-bot
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.