singleton

inline fun <R> singleton(typeKey: TypeKey<R> = erased(), noinline factory: GFactory<R>): SingletonService<R>(source)

Register a singleton scoped factory for an instance of type R.

Parameters

typeKey

The TypeKey this service is registered with.

factory

The factory for type R.