API reference › @evolu/common › Task › NextTask
type NextTask<T, E, D> = Task<T, E | Done<D>>;
Defined in: packages/common/src/Task.ts:502
A Task that can complete with a value, signal done, or fail.
Forms a pair with NextResult:
Result<A, E>→NextResult<A, E, D>Task<T, E>→NextTask<T, E, D>
Use for pull-based protocols like iterators where Done<D> signals normal
completion rather than an error.