API reference › @evolu/common › Result › 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 valueErr<Done<D>>— completed normally with a done valueErr<E>— failed with an error
Inspired by JavaScript's Iterator.next(), which returns { value, done }.