effect-io-ai

Package: effect
Module: Result

Result.ResultIterator

Iterator protocol used to yield a Result inside gen, returning the success value type back to the generator.

When to use

Use when defining or typing [Symbol.iterator]() for Result values so yield* can pass the success value type back into Result.gen.

See

Signature

export interface ResultIterator<T extends Result<any, any>> {
  next(
    ...args: ReadonlyArray<any>
  ): IteratorResult<T, Result.Success<T>>
}

Source

Since v4.0.0