@arcmantle/adapter-element
    Preparing search index...

    Interface ClassBinding

    Binding configuration for class constructors. Used when registering a class that should be instantiated when resolved.

    interface ClassBinding {
        activator?: (instance: any, container: PluginContainer) => any;
        cache: any;
        initializer: new (...args: any[]) => any;
        method: Lifetimes;
        moduleId?: Identifier;
        named?: Identifier;
        resolution: "first" | "last";
        tagged?: Identifier;
        type: "class";
    }

    Hierarchy (View Summary)

    Index

    Properties

    activator?: (instance: any, container: PluginContainer) => any

    Optional post-creation hook that processes the instance before returning it

    cache: any

    Internal cache for singleton instances - stores the created instance to avoid recreating it

    initializer: new (...args: any[]) => any

    The value, constructor, or factory function used to create instances

    method: Lifetimes

    Lifetime management strategy - 'singleton' reuses instances, 'transient' creates new ones

    moduleId?: Identifier

    Internal identifier linking this binding to a specific module for organized loading/unloading

    named?: Identifier

    Optional name for the binding to allow multiple bindings for the same identifier

    resolution: "first" | "last"

    A resolution of first denotes that the first container in the lineage with a binding will be used. A resolution of last denotes that the last container in the lineage with a binding will be used.

    tagged?: Identifier

    Optional tag used in combination with name for even more specific binding identification

    type: "class"

    The binding type - determines how the value is created ('class', 'factory', or 'constant')