@lppedd/di-wise-neo - v0.19.0
    Preparing search index...

    Interface ContainerHook

    A hook into the lifecycle of a Container.

    interface ContainerHook {
        onDispose?: (values: unknown[]) => void;
        onProvide?: (value: unknown, scope: Scope) => void;
    }
    Index

    Properties

    onDispose?: (values: unknown[]) => void

    Called after the container has been disposed.

    Type Declaration

      • (values: unknown[]): void
      • Parameters

        • values: unknown[]

          All distinct values that were cached by the disposed container. Currently, only Container-scoped token values are cached.

        Returns void

    onProvide?: (value: unknown, scope: Scope) => void

    Called when the container provides a value for a Token.

    • For Container-scoped tokens, it is called only once when the token is first resolved and cached.
    • For Resolution-scoped tokens, it is called once per token resolution graph.
    • For Transient-scoped tokens, it is called each time the token is resolved, which might mean multiple times per resolution graph.

    Type Declaration

      • (value: unknown, scope: Scope): void
      • Parameters

        • value: unknown

          The provided value.

        • scope: Scope

          The Scope of the provided value.

        Returns void