Given a LiftArbitrary function, and 1..n Arbitrarys for different types A₁, A₂, ...Aₙ, returns the given list except every arbitrary for type Aᵢ has been replaced by an arbitrary for type Kind<F,In1,Out2,Out1,Aᵢ>. For example:

const [arbOptionString, arbOptionNumber] = liftArbitraries<OptionTypeLambda>(
Arbitraries.option,
)(
fc.integer(),
fc.string(),
)
// arbOptionString ≡ fc.Arbitrary<Option<string>>
// arbOptionNumber ≡ fc.Arbitrary<Option<number>>
  • Type Parameters

    • F extends TypeLambda
    • In1 = never
    • Out2 = unknown
    • Out1 = unknown

    Parameters

    Returns (<const Arbs>(...arbs: Arbs) => {
        [K in string | number | symbol]: Arbitrary<Kind<F, In1, Out2, Out1, Arbs[K<K>] extends Arbitrary<T>
            ? T
            : never>>
    })

      • <const Arbs>(...arbs): {
            [K in string | number | symbol]: Arbitrary<Kind<F, In1, Out2, Out1, Arbs[K<K>] extends Arbitrary<T>
                ? T
                : never>>
        }
      • Type Parameters

        • const Arbs extends Arbitrary<unknown>[]

        Parameters

        Returns {
            [K in string | number | symbol]: Arbitrary<Kind<F, In1, Out2, Out1, Arbs[K<K>] extends Arbitrary<T>
                ? T
                : never>>
        }