type alias ServiceFactory
Since 0.1.0

A factory invoked lazily on the first lookup of a token registered with IServiceRegistry.registerFactory.

No-argument: the registry holds the factory and calls it with nothing when the token is first resolved. Do not confuse with RegistryFactory, which takes the IServiceRegistry as its one argument — the two differ in arity and are not interchangeable.

Type Parameters

The service type produced

Definition

() => T

Usage

import { type ServiceFactory } from "common/src/index.ts";