Hyperlinkv0.8.0-beta.28

Option

Option.OptionIteratorinterfaceeffect/Option.ts:101
OptionIterator<T>

Iterator protocol used to yield an Option inside gen, returning the contained value type back to the generator.

When to use

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

generatorsgen
Source effect/Option.ts:1015 lines
export interface OptionIterator<T extends Option<any>> {
  next(
    ...args: ReadonlyArray<any>
  ): IteratorResult<T, Option.Value<T>>
}
Referenced by 3 symbols