/**
 * inspired by https://github.com/tusharmath/qio/pull/22 (revised)
 */
import { _A, _E, _R } from "../Effect/commons"
import type { Either } from "../Either"
import { NoSuchElementException } from "../GlobalExceptions"
import type { Has, Tag } from "../Has"
import type { Option } from "../Option"
import type * as Utils from "../Utils"
import type { Sync } from "./core"
export declare class GenSync<R, E, A> {
  readonly effect: Sync<R, E, A>;
  readonly [_R]: (_R: R) => void;
  readonly [_E]: () => E;
  readonly [_A]: () => A
  constructor(effect: Sync<R, E, A>)
  [Symbol.iterator](): Generator<GenSync<R, E, A>, A, any>
}
export declare function gen<Eff extends GenSync<any, any, any>, AEff>(
  f: (i: {
    <A>(_: Tag<A>): GenSync<Has<A>, never, A>
    <E, A>(_: Option<A>, onNone: () => E): GenSync<unknown, E, A>
    <A>(_: Option<A>): GenSync<unknown, NoSuchElementException, A>
    <E, A>(_: Either<E, A>): GenSync<unknown, E, A>
    <R, E, A>(_: Sync<R, E, A>): GenSync<R, E, A>
  }) => Generator<Eff, AEff, any>
): Sync<Utils._R<Eff>, Utils._E<Eff>, AEff>
//# sourceMappingURL=gen.d.ts.map
