TaskOptions
Type. Task strategy and outcome callbacks.
Table of contents
Category
Type
Type import
tsimport type { TaskOptions } from "valyrian.js/tasks";Public signature
tstype TaskOptions<TArgs, TResult> = { strategy?: TaskStrategy; onSuccess?: (result: TResult, args: TArgs) => void; onError?: (error: unknown, args: TArgs) => void; };Type usage
TaskOptions configures scheduling and callbacks while preserving argument and result types.
Defaults
strategy defaults to takeLatest. Both callbacks are optional.