Interface InjectableOptions<T>

Options for creating an injectable class or factory.

interface InjectableOptions<T extends unknown[] = []> {
    inject?: T;
    name?: string | symbol | (string | symbol)[];
    scope?: Scope;
}

Type Parameters

  • T extends unknown[] = []

    The inject types.

Properties

Properties

inject?: T

The parameter types. Optional when injectable has no parameters. Otherwise it must match the constructor/factory signature.

name?: string | symbol | (string | symbol)[]

Optional qualifier name (or names) of this injectable. This allows injecting it via name in addition to its type.

scope?: Scope

The injection scope. Defaults to Scope.SINGLETON.