Injector
Injector
The Injector wraps the underlying Nestjs ModuleRef
, allowing injection of providers
known to the application’s dependency injection container. This is intended to enable the injection
of services into objects which exist outside of the Nestjs module system, e.g. the various
Strategies which can be supplied in the VendureConfig.
Signature
class Injector {
constructor(moduleRef: ModuleRef)
get(typeOrToken: Type<T> | string | symbol) => R;
resolve(typeOrToken: Type<T> | string | symbol, contextId?: ContextId) => Promise<R>;
}
Members
constructor
(moduleRef: ModuleRef) => Injector
get
(typeOrToken: Type<T> | string | symbol) => R
ModuleRef.get()
method.
resolve
(typeOrToken: Type<T> | string | symbol, contextId?: ContextId) => Promise<R>
ModuleRef.resolve()
method.