effect-ts-laws
    Preparing search index...

    Interface GivenConcerns<F, A, B, C, R, O, E>

    The equivalence and arbitrary concerns of typeclass test options, together with an optional Monoid for the underlying type A

    Everything required to build laws for a typeclass except the instances under test.

    interface GivenConcerns<
        F extends TypeLambda,
        A,
        B = A,
        C = A,
        R = never,
        O = unknown,
        E = unknown,
    > {
        a: Arbitrary<A>;
        b: Arbitrary<B>;
        c: Arbitrary<C>;
        equalsA: Equivalence<A>;
        equalsB: Equivalence<B>;
        equalsC: Equivalence<C>;
        getArbitrary: LiftArbitrary<F, R, O, E>;
        getEquivalence: LiftEquivalence<F, R, O, E>;
        Monoid: Monoid<A>;
        predicateA: Arbitrary<Predicate<A>>;
        predicateB: Arbitrary<Predicate<B>>;
        predicateC: Arbitrary<Predicate<C>>;
    }

    Type Parameters

    • F extends TypeLambda
    • A
    • B = A
    • C = A
    • R = never
    • O = unknown
    • E = unknown

    Hierarchy (View Summary)

    Index

    Properties

    a: Arbitrary<A>

    An arbitrary for the underlying type A.

    b: Arbitrary<B>

    An arbitrary for the underlying type B.

    c: Arbitrary<C>

    An arbitrary for the underlying type C.

    equalsA: Equivalence<A>

    An equivalence for the underlying type A.

    equalsB: Equivalence<B>

    An equivalence for the underlying type B.

    equalsC: Equivalence<C>

    An equivalence for the underlying type C.

    getArbitrary: LiftArbitrary<F, R, O, E>

    A function that will get an arbitrary for the type under test from an arbitrary for the underlying type.

    getEquivalence: LiftEquivalence<F, R, O, E>

    A function that will get an equivalence for the type under test from an equivalence for the underlying type.

    Monoid: Monoid<A>

    Required Monoid for the underlying type A, useful for typeclasses like Applicative that can build their own Monoid instance from it.

    predicateA: Arbitrary<Predicate<A>>

    Predicate for values of type A.

    predicateB: Arbitrary<Predicate<B>>

    Predicate for values of type B.

    predicateC: Arbitrary<Predicate<C>>

    Predicate for values of type C.