Signature
tsSignature
export function contextWithSignal<C extends object>( context: RuntimeContext<C>, signal: AbortSignal,): RuntimeContext<C>;Imports
tsImport
import { contextWithSignal } from "@/lib/flow/core/runtime";import { contextWithSignal } from "@/lib/flow";Type Parameters
CCustom context type.
Parameters
contextExisting runtime context.
signalAbortSignal
Replacement signal.
Returns
A context with the same custom fields and the replacement signal.
Return type
RuntimeContext<C>Details
This advanced helper is used by timeout and parallel helpers when they create child abort
controllers.
Related Symbols
RuntimeContext
Execution context passed to every behavior.
type
when
Branches between two behaviors using a predicate function.
function
Source
tsflow/core/runtime.ts:284-289
export function contextWithSignal<C extends object>( context: RuntimeContext<C>, signal: AbortSignal,): RuntimeContext<C> { return { ...context, signal };}