@microsoft/fast-foundation > ResolverBuilder > singleton
ResolverBuilder.singleton() method
Creates a resolver that enforces a singleton lifetime.
Signature:singleton(value: Constructable): Resolver<K>;
Parameters
Parameter | Type | Description |
---|---|---|
value | Constructable | The type to create and cache the singleton for. |
Resolver<K>
The resolver.