DiProvider: {
    token: DiToken<T>;
    useClass?: Newable<T>;
    useFactory?: (...deps: unknown[]) => T;
}

A DI provider.

Type Parameters

  • T

Type declaration

  • token: DiToken<T>

    The token under which the value should be registered.

  • OptionaluseClass?: Newable<T>

    A class to register for the token.

  • OptionaluseFactory?: (...deps: unknown[]) => T

    A factory function that resolves the value to register for the token.