Closed
Description
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());