InvokeOptions
@tsed/di
Usage
typescript
import { InvokeOptions } from "@tsed/di";Overview
ts
interface InvokeOptions {
deps: TokenProvider[];
imports: TokenProvider[];
parent?: TokenProvider;
rebuild?: boolean;
useOpts?: Record<string, unknown>;
locals?: LocalsContainer;
}Description
Options for invoking and building a provider instance.
Controls how the injector resolves dependencies, handles imports, and constructs provider instances. Used when manually invoking the injector to create instances with specific configuration.
deps
ts
deps: TokenProvider[];Define dependencies to build the provider and inject them in the constructor.
imports
ts
imports: TokenProvider[];List of imports to be created before the provider. Imports list aren't injected directly in the provider constructor.
parent
ts
parent?: TokenProvider;Parent provider.
rebuild
ts
rebuild?: boolean;If true, the injector will rebuild the instance.
useOpts
ts
useOpts?: Record<string, unknown>;Option given to injectable props or parameter constructor (UseOpts).
locals
ts
locals?: LocalsContainer;