Signature
tsSignature
export type TaskContext<C extends object = {}> = RuntimeContext<C> & { ok: typeof ok; succeed: typeof ok; fail: typeof err; err: typeof err;};Imports
tsImport
import { TaskContext } from "@/lib/flow/task";import { TaskContext } from "@/lib/flow";Type Parameters
CCustom context object type.
Details
The context includes the standard Flow runtime context plus helpers for creating explicit
success and failure results.
Related Symbols
err
Re-exports core result helpers used by advanced record internals.
re-export
fail
Creates a behavior that always fails with the same domain error.
function
ok
Re-exports core result helpers used by advanced record internals.
re-export
RuntimeContext
Execution context passed to every behavior.
type
succeed
Creates a behavior that always succeeds with the same value.
function
Source
tsflow/task.ts:12-17
export type TaskContext<C extends object = {}> = RuntimeContext<C> & { ok: typeof ok; succeed: typeof ok; fail: typeof err; err: typeof err;};