Reusable implementation for metadata validation states.

Implements

Constructors

Properties

Methods

Constructors

Properties

valid: boolean = true

If the metadata object is valid.

If it is invalid, the metadata values should be considered outdated, and a new version should be requested.

Methods

  • Add an listener that will be invoked when the metadata object becomes invalid.

    No expensive operations should be done in these listeners, only other invalidations. If other operations should be done, those should be scheduled in next ticks.

    Parameters

    • listener: (() => void)

      An invalidation listener.

        • (): void
        • Returns void

    Returns void