Interface FinalizationRegistry<T>

Type Parameters

  • T

Hierarchy

  • FinalizationRegistry

Properties

Methods

Properties

[toStringTag]: "FinalizationRegistry"

Methods

  • Registers an object with the registry.

    Parameters

    • target: object

      The target object to register.

    • heldValue: T

      The value to pass to the finalizer for this object. This cannot be the target object.

    • Optional unregisterToken: object

      The token to pass to the unregister method to unregister the target object. If provided (and not undefined), this must be an object. If not provided, the target cannot be unregistered.

    Returns void

  • Unregisters an object from the registry.

    Parameters

    • unregisterToken: object

      The token that was used as the unregisterToken argument when calling register to register the target object.

    Returns void