I presume that objects added to a WeakSet and/or WeakMap are themselves tagged in some way to indicate membership. If so, is this tagging visible in userland code?
For example:
const go = () => {
const o = {}
s.add(o)
return o
}
const s = new WeakSet
const o = go()
// can I detect that `o` is in a WeakSet, just by inspecting `o`?