Libraries
    Preparing search index...

    Interface ServiceDescriptor<T>

    Describes a registered service: its schema key, lifetime, factory, and optional runtime validation flag.

    interface ServiceDescriptor<T = any> {
        factory: ServiceFactory<T>;
        lifetime: ServiceLifetime;
        schema: SchemaBuilder<T, any, any, any, any>;
        validate: boolean;
    }

    Type Parameters

    • T = any

      The type of the service instance.

    Index

    Properties

    factory: ServiceFactory<T>

    The factory function that creates the service instance.

    lifetime: ServiceLifetime

    The lifetime of the service.

    schema: SchemaBuilder<T, any, any, any, any>

    The schema used as the service identifier (reference equality).

    validate: boolean

    When true, the container validates the factory's return value against the schema at resolution time using schema.validate().

    false