Manages global initializers.

Constructors

Accessors

Methods

Constructors

Accessors

  • get size(): number
  • Returns the number of references currently in the registry.

    Returns number

Methods

  • Registers an initializer that will be invoked during global state initialization.

    Type Parameters

    Parameters

    • initializer: T

    Returns T

  • Resets all registered initializers and sets this registry back to its pre-initialized state. This is typically only done within unit tests, but may be called if all players are disposed and the consumer intends to teardown global state.

    Returns void

  • Removes a global ref from the registry. May be called at any time.

    Parameters

    Returns boolean

    Returns true if the global ref was removed.