A factory for a Service. Any constructor may be a service factory.

interface Factory<T> {
    new Factorynew (...args: any[]): T;
    [create]?: ((environment: Environment) => T);
}

Type Parameters

Constructors

Properties

Constructors

  • Parameters

    • Rest...args: any[]

    Returns T

Properties

[create]?: ((environment: Environment) => T)

The environment will create the service automatically if the factory supports create.