Libraries
    Preparing search index...

    Type Alias ServiceFactory<T>

    ServiceFactory: (provider: IServiceProvider) => T

    A factory function that creates a service instance, optionally resolving other services from the provided ServiceProvider.

    Type Parameters

    • T

      The type of the service instance the factory creates.

    Type Declaration

    const loggerFactory: ServiceFactory<Logger> = (provider) => {
    const config = provider.get(IConfig);
    return new Logger(config.logLevel);
    };