effect-ts-laws
    Preparing search index...

    Function testTypeclassLaws

    • Test typeclass laws on the given instances of some datatype F. All laws are monomorphic on an underlying type of Option<number@.. At the property testTypeclassLaws.underlyingProps you will find the same function, except it uses the underlying type `{x: number; y: string}, useful when testing laws on React components, as they can only accept a single object argument.

      Type Parameters

      • F extends TypeLambda
      • R = never
      • O = unknown
      • E = unknown

      Parameters

      Returns <Ins extends Partial<Concrete<Kind<F, R, O, E, Mono>> & Parameterized<F>>>(
          instances: Ins,
          parameters?: ParameterOverrides,
      ) => void

        • <Ins extends Partial<Concrete<Kind<F, R, O, E, Mono>> & Parameterized<F>>>(
              instances: Ins,
              parameters?: ParameterOverrides,
          ): void
        • Type Parameters

          Parameters

          • instances: Ins

            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.

          • Optionalparameters: ParameterOverrides

            Optional runtime fast-check parameters.

          Returns void

    Index

    vitest

    underlyingProps: <F extends TypeLambda, R = never, O = unknown, E = unknown>(
        given: MonomorphicGiven<F, R, O, E>,
    ) => <
        Ins extends
            Partial<Concrete<Kind<F, R, O, E, MonoProps>> & Parameterized<F>>,
    >(
        instances: Ins,
        parameters?: ParameterOverrides,
    ) => void

    Test typeclass laws on the given instances of some datatype F. All laws are monomorphic on an underlying type of {x: number; y: string}.

    Type declaration