Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Type definitions for 'Symbols as WeakMap keys' #52534

Copy link
Copy link
@acutmore

Description

@acutmore
Issue body actions

lib Update Request for 'Symbols as WeakMap keys'

Configuration Check

My compilation target is ESNext and my lib is the default.

Missing / Incorrect Definition

Symbols as WeakMap keys went to stage 4 at TC39 yesterday.
The types for WeakMap, WeakSet, WeakRef and FinalizationRegistry can be updated to reflect that symbol is now also allowed alongside the existing object constraint.

Sample Code

new WeakMap<symbol, any>();
new WeakSet<symbol>();
new WeakRef(Symbol());
new FinalizationRegistry(() => {}).register(Symbol());

Documentation Link

https://github.com/tc39/proposal-symbols-as-weakmap-keys

Reactions are currently unavailable

Metadata

Metadata

Assignees

Labels

Domain: lib.d.tsThe issue relates to the different libraries shipped with TypeScriptThe issue relates to the different libraries shipped with TypeScriptEffort: CasualGood issue if you're already used to contributing to the codebase. Harder than "good first issue".Good issue if you're already used to contributing to the codebase. Harder than "good first issue".Fix AvailableA PR has been opened for this issueA PR has been opened for this issueHelp WantedYou can do thisYou can do this

Type

No type
No fields configured for issues without a type.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.