Interface FinalizationRegistry<T>
interface FinalizationRegistry<T> {
[toStringTag]: "FinalizationRegistry";
register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void;
unregister(unregisterToken: WeakKey): boolean;
}
[toStringTag]: "FinalizationRegistry";
register(target: WeakKey, heldValue: T, unregisterToken?: WeakKey): void;
unregister(unregisterToken: WeakKey): boolean;
}
Type Parameters
Index
Properties
Methods
Methods
register
unregister
- unregister(unregisterToken): boolean
Unregisters a value from the registry. In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.
Parameters
- unregisterToken: WeakKey
The token that was used as the unregisterToken argument when calling register to register the target value.
Returns boolean
- unregisterToken: WeakKey
Registers a value with the registry. In es2023 the value can be either a symbol or an object, in previous versions only object is permissible.