Proxy an object so it "expires" (becomes inaccessible) when the calling context is cleaned up.
Any attempts to use the returned object (other than to check its typeof) after the context ends (or is reset) will result in a TypeError.
typeof
Note: your runtime environment must support Proxy.revocable().
Proxy.revocable()
Proxy an object so it "expires" (becomes inaccessible) when the calling context is cleaned up.
Any attempts to use the returned object (other than to check its
typeof) after the context ends (or is reset) will result in a TypeError.Note: your runtime environment must support
Proxy.revocable().