Browse documentation

TaskState

Type. Generic Task state snapshot.

Table of contents

Category

Type

Type import

ts
import type { TaskState } from "valyrian.js/tasks";

Public signature

ts
type TaskState<TResult> = { status: TaskStatus; running: boolean; result: TResult | null; error: unknown; };

Type usage

TaskState carries the generic result together with status, running and error fields.