Skip to content

extendContext

extendContext(context, properties, inheritanceTransformers?): void

Defined in: core/src/core/context.ts:167

Use this function to add or extend properties of the root context. Called by middleware’s createContext to update the root context. Handler-scoped contexts will automatically inherit these properties from the root context. Never create a new object (e.g., using a spread \{...context\}) in your middleware’s createContext.

WorkflowContext

The context to extend

Record<string, any>

The properties to add to the context

Record<string, InheritanceTransformer>

The inheritance transformers to apply to existing properties (optional)

void