The arguments that the resolved Subcomponent will accept to produce the child container.
A SubcomponentDefinition producing a Subcomponent that transforms Args into a container with the dependencies and scopes provided by setup
Defining a subcomponent:
const UserSubcomponent = Inject.subcomponent(
(ct, name: string, id: number) => ct
.addScope(UserScope)
.provideInstance(NameKey, name)
.provideInstance(IdKey, id)
)
Using a subcomponent:
const child = parent.request(UserSubcomponent)('Alice', 123)
const child = parent.build(UserSubcomponent, 'Alice', 123)
parent.inject({ child: UserSubcomponent.Build('Alice', 123) }, ({ child }) => {
// ...
})
Generated using TypeDoc
Defines a subcomponent that applies the scopes and dependencies provided in setup to a new child container.