Skip to content

ContextSource

Defined in: packages/pipeline/src/interfaces/context-source.interface.ts:8

A value kept for the current execution by the package that owns it, such as the tenant of @cqrs-ddd/pipeline-tenant. A pipeline reads it when it starts and runs its behaviors inside it, so nested dispatches inherit it.

current(): string | undefined

Defined in: packages/pipeline/src/interfaces/context-source.interface.ts:10

The value of the current execution, or undefined for none.

string | undefined


run<T>(value, fn): T

Defined in: packages/pipeline/src/interfaces/context-source.interface.ts:15

Runs fn with value as the current value (undefined: none) for everything it calls, synchronously or asynchronously.

T

string | undefined

() => T

T