UNPKG

effect-ts-laws

Version:
29 lines 1.21 kB
import type { TypeLambda } from 'effect/HKT'; import type { ParameterOverrides } from '../law.js'; import type { GivenConcerns, Parameterized } from '../laws.js'; /** * Test [parameterized type](https://github.com/Effect-TS/effect/blob/main/packages/typeclass/README.md#parameterized-types) * typeclass laws for the given instances of some datatype. * * @typeParam F - Type lambda of the datatype under test. * @typeParam A - Type lambda of first underlying type. * @typeParam B - Type lambda of second underlying type. * @typeParam C - Type lambda of third underlying type. * @category vitest */ export declare const testParameterizedTypeclassLaws: <F extends TypeLambda, A, B = A, C = A>() => <Ins extends Partial<Parameterized<F>>, R = never, O = unknown, E = unknown>( /** * Instances to test. Key is typeclass name and value is the * instance under test. For example, `{ Monad: Option.Monad }` will run * the monad typeclass laws on `Option`. */ instances: Ins, /** * Parameterized typeclass test options. */ given: GivenConcerns<F, A, B, C, R, O, E>, /** * Optional runtime `fast-check` parameters. */ parameters?: ParameterOverrides) => void; //# sourceMappingURL=parameterized.d.ts.map