effect-ts-laws
Version:
effect-ts law testing using fast-check.
29 lines • 1.02 kB
TypeScript
/**
* `@effect/typeclass` instances for the `fast-check` Arbitrary type.
* @module
*/
import { Monad as MD } from '@effect/typeclass';
import { Equivalence as EQ } from 'effect';
import type { TypeLambda } from 'effect/HKT';
import fc from 'fast-check';
/**
* Type lambda for the `fc.Arbitrary` datatype.
* @category type lambda
*/
export interface ArbitraryTypeLambda extends TypeLambda {
readonly type: fc.Arbitrary<this['Target']>;
}
/**
* Monad instance for `fc.Arbitrary`.
* @category fast-check
*/
export declare const Monad: MD.Monad<ArbitraryTypeLambda>;
/**
* Get an equivalence for `fc.Arbitrary<A>` from an equivalence of `A`.
* Arbitraries are equal if they produce the same values for the same seeds.
* Note this only means we were unable to find a counterexample to the
* equivalence.
* @category fast-check
*/
export declare const getEquivalence: <A>(equalsA: EQ.Equivalence<A>, parameters?: fc.Parameters<number>) => EQ.Equivalence<fc.Arbitrary<A>>;
//# sourceMappingURL=instances.d.ts.map