Details
-
Bug
-
Resolution: Invalid
-
P3: Somewhat important
-
6.8
-
None
Description
const map = new WeakMap(); const sym = Symbol(); map.set(sym, 42);
This code is supposed to work in ES6, but it raises a TypeError instead.
https://tc39.es/ecma262/multipage/keyed-collections.html#sec-weakmap-objects
"WeakMaps are collections of key/value pairs where the keys are objects and/or symbols"