import type { Kind, TypeLambda } from "./HKT.js"; import type * as Types from "./Types.js"; /** * @category symbols * @since 2.0.0 */ export declare const GenKindTypeId: unique symbol; /** * @category symbols * @since 2.0.0 */ export type GenKindTypeId = typeof GenKindTypeId; /** * @category models * @since 2.0.0 */ export interface GenKind extends Variance { readonly value: Kind; [Symbol.iterator](): IterableIterator, A>; } /** * @category predicates * @since 3.0.6 */ export declare const isGenKind: (u: unknown) => u is GenKind; /** * @category constructors * @since 2.0.0 */ export declare class GenKindImpl implements GenKind { /** * @since 2.0.0 */ readonly value: Kind; constructor( /** * @since 2.0.0 */ value: Kind); /** * @since 2.0.0 */ get _F(): (a: A_1) => A_1; /** * @since 2.0.0 */ get _R(): (_: R) => R; /** * @since 2.0.0 */ get _O(): (_: never) => O; /** * @since 2.0.0 */ get _E(): (_: never) => E; /** * @since 2.0.0 */ readonly [GenKindTypeId]: typeof GenKindTypeId; /** * @since 2.0.0 */ [Symbol.iterator](): IterableIterator, A>; } /** * @category constructors * @since 2.0.0 */ export declare class SingleShotGen implements IterableIterator { readonly self: T; private called; constructor(self: T); /** * @since 2.0.0 */ next(a: A): IteratorResult; /** * @since 2.0.0 */ return(a: A): IteratorResult; /** * @since 2.0.0 */ throw(e: unknown): IteratorResult; /** * @since 2.0.0 */ [Symbol.iterator](): IterableIterator; } /** * @category constructors * @since 2.0.0 */ export declare const makeGenKind: (kind: Kind) => GenKind; /** * @category models * @since 2.0.0 */ export interface Variance { readonly [GenKindTypeId]: GenKindTypeId; readonly _F: Types.Invariant; readonly _R: Types.Contravariant; readonly _O: Types.Covariant; readonly _E: Types.Covariant; } /** * @category models * @since 2.0.0 */ export interface Gen { | YieldWrap>, A>(...args: [ self: Self, body: (this: Self, resume: Z) => Generator ] | [ body: (resume: Z) => Generator ]): Kind] ? R : [K] extends [YieldWrap>] ? R : never, [ K ] extends [Variance] ? O : [K] extends [YieldWrap>] ? O : never, [ K ] extends [Variance] ? E : [K] extends [YieldWrap>] ? E : never, A>; } /** * @category models * @since 2.0.0 */ export interface Adapter { <_R, _O, _E, _A>(self: Kind): GenKind; (a: A, ab: (a: A) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: F) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (g: H) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => Kind): GenKind; (a: A, ab: (a: A) => B, bc: (b: B) => C, cd: (c: C) => D, de: (d: D) => E, ef: (e: E) => F, fg: (f: F) => G, gh: (g: G) => H, hi: (h: H) => I, ij: (i: I) => J, jk: (j: J) => K, kl: (k: K) => L, lm: (l: L) => M, mn: (m: M) => N, no: (n: N) => O, op: (o: O) => P, pq: (p: P) => Q, qr: (q: Q) => R, rs: (r: R) => S, st: (s: S) => T, tu: (s: T) => Kind): GenKind; } /** * @category adapters * @since 2.0.0 */ export declare const adapter: () => Adapter; /** * @category model * @since 2.0.0 */ export type PCGRandomState = [number, number, number, number]; /** * @category model * @since 2.0.0 */ export type OptionalNumber = number | null | undefined; /** * PCG is a family of simple fast space-efficient statistically good algorithms * for random number generation. Unlike many general-purpose RNGs, they are also * hard to predict. * * @category model * @since 2.0.0 */ export declare class PCGRandom { private _state; /** * Creates an instance of PCGRandom. * * - `seed` - The low 32 bits of the seed (0 is used for high 32 bits). * * @memberOf PCGRandom */ constructor(seed?: OptionalNumber); /** * Creates an instance of PCGRandom. * * - `seedHi` - The high 32 bits of the seed. * - `seedLo` - The low 32 bits of the seed. * - `inc` - The low 32 bits of the incrementer (0 is used for high 32 bits). * * @memberOf PCGRandom */ constructor(seedHi: OptionalNumber, seedLo: OptionalNumber, inc?: OptionalNumber); /** * Creates an instance of PCGRandom. * * - `seedHi` - The high 32 bits of the seed. * - `seedLo` - The low 32 bits of the seed. * - `incHi` - The high 32 bits of the incrementer. * - `incLo` - The low 32 bits of the incrementer. * * @memberOf PCGRandom */ constructor(seedHi: OptionalNumber, seedLo: OptionalNumber, incHi: OptionalNumber, incLo: OptionalNumber); /** * Returns a copy of the internal state of this random number generator as a * JavaScript Array. * * @category getters * @since 2.0.0 */ getState(): PCGRandomState; /** * Restore state previously retrieved using `getState()`. * * @since 2.0.0 */ setState(state: PCGRandomState): void; /** * Get a uniformly distributed 32 bit integer between [0, max). * * @category getter * @since 2.0.0 */ integer(max: number): number; /** * Get a uniformly distributed IEEE-754 double between 0.0 and 1.0, with * 53 bits of precision (every bit of the mantissa is randomized). * * @category getters * @since 2.0.0 */ number(): number; } /** * @since 3.0.6 */ export declare const YieldWrapTypeId: unique symbol; /** * @since 3.0.6 */ export declare class YieldWrap { #private; constructor(value: T); /** * @since 3.0.6 */ [YieldWrapTypeId](): T; } /** * @since 3.0.6 */ export declare function yieldWrapGet(self: YieldWrap): T; /** * Note: this is an experimental feature made available to allow custom matchers in tests, not to be directly used yet in user code * * @since 3.1.1 * @status experimental * @category modifiers */ export declare const structuralRegionState: { enabled: boolean; tester: ((a: unknown, b: unknown) => boolean) | undefined; }; /** * Note: this is an experimental feature made available to allow custom matchers in tests, not to be directly used yet in user code * * @since 3.1.1 * @status experimental * @category modifiers */ export declare const structuralRegion: (body: () => A, tester?: (a: unknown, b: unknown) => boolean) => A; /** * @since 3.2.2 * @status experimental * @category tracing */ export declare const internalCall: (body: () => A) => A; /** * @since 3.11.0 */ export declare const isGeneratorFunction: (u: unknown) => u is (...args: Array) => Generator; //# sourceMappingURL=Utils.d.ts.map