DI Bag API / index / ContextualFactory
Type Alias: ContextualFactory<F extends (this: void, dependencies: never, factoryContext: never) => unknown>
ts
type ContextualFactory<F extends (this: void, dependencies: never, factoryContext: never) => unknown> = (this: void, dependencies: Parameters<F> extends [] ? {} : Parameters<F>[0]) => ReturnType<F>;Defined in: acquisition-context.ts:46
The named-dependency factory contract retained by an acquisition-context callback.
Type Parameters
| Type Parameter | Description |
|---|---|
F | The contextual callback whose named dependencies and return type are retained. |
Parameters
| Parameter | Description |
|---|---|
this | - |
dependencies | - |
See
https://dany-fedorov.github.io/di-bag/guides/tutorial.html#make-selected-services-ready