API reference@evolu/commonResult › NextResult

type NextResult<A, E, D> = Result<A, E | Done<D>>;

Defined in: packages/common/src/Result.ts:461

A result for a pull-based protocol with three outcomes.

The consumer requests the next value (e.g. via next()), and the producer responds with one of:

  • Ok<A> — produced a value
  • Err<Done<D>> — completed normally with a done value
  • Err<E> — failed with an error

Inspired by JavaScript's Iterator.next(), which returns { value, done }.