Signature
tsSignature
export function input<I>(): Behavior<I, I, never>;Imports
tsImport
import { input } from "@/lib/flow/input";import { input } from "@/lib/flow";Type Parameters
IInput and output type.
Returns
A behavior that succeeds with its input value.
Return type
Behavior<I, I, never>Details
`input` is useful when the first meaningful step is a `map`, `tap`, or `pipe` composition and
you want the pipeline input type to be explicit.
Examples
tsExample
const normalizeName = pipe(input<string>(), map(input<string>(), (value) => value.trim()));Related Symbols
Behavior
Executable Flow workflow unit.
type
map
Maps the successful output of a behavior.
function
tap
Runs a side effect after source success without changing the output.
function
when
Branches between two behaviors using a predicate function.
function
Source
tsflow/input.ts:18-20
export function input<I>(): Behavior<I, I, never> { return task<I, I, never>((value, context) => context.ok(value));}