Signature
tsSignature
export type Behavior<I, O, E = unknown, C extends object = {}> = ( input: I, context: RuntimeContext<C>,) => Promise<Result<O, E | RuntimeError>>;Imports
tsImport
import { Behavior } from "@/lib/flow/core/runtime";import { Behavior } from "@/lib/flow";Type Parameters
IInput type.
OOutput type.
EExpected domain error type.
CCustom context type.
Details
A behavior receives typed input, reads runtime context, and resolves to a `Result` containing
either typed output, typed domain error, or a runtime error.
Related Symbols
input
Creates an identity behavior for starting typed pipelines.
function
Result
Explicit success-or-failure outcome used throughout Flow.
type
RuntimeContext
Execution context passed to every behavior.
type
RuntimeError
Runtime-level failure union added around every behavior's domain error type.
type
Source
tsflow/core/runtime.ts:55-58
export type Behavior<I, O, E = unknown, C extends object = {}> = ( input: I, context: RuntimeContext<C>,) => Promise<Result<O, E | RuntimeError>>;