Hyperlinkv0.8.0-beta.28

Result

Result.ResultIteratorinterfaceeffect/Result.ts:129
ResultIterator<T>

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.

generatorsgen
Source effect/Result.ts:1295 lines
export interface ResultIterator<T extends Result<any, any>> {
  next(
    ...args: ReadonlyArray<any>
  ): IteratorResult<T, Result.Success<T>>
}
Referenced by 3 symbols