跳转到内容

extendContext

extendContext(context, properties, inheritanceTransformers?): void

定义于:core/src/core/context.ts:167

使用此函数添加或扩展根上下文的属性。 由中间件的 createContext 调用以更新根上下文。 处理程序作用域的上下文将自动从根上下文继承这些属性。 切勿在中间件的 createContext 中创建新对象(例如,使用展开运算符 \{...context\})。

WorkflowContext

要扩展的上下文

Record<string, any>

要添加到上下文中的属性

Record<string, InheritanceTransformer>

应用于现有属性的继承转换器(可选)

void