1 | import type { Arbitrary } from '../check/arbitrary/definition/Arbitrary.js';
|
2 | /**
|
3 | * Type of the value produced by {@link clone}
|
4 | * @remarks Since 2.5.0
|
5 | * @public
|
6 | */
|
7 | export type CloneValue<T, N extends number, Rest extends T[] = []> = [number] extends [N] ? T[] : Rest['length'] extends N ? Rest : CloneValue<T, N, [T, ...Rest]>;
|
8 | /**
|
9 | * Clone the values generated by `arb` in order to produce fully equal values (might not be equal in terms of === or ==)
|
10 | *
|
11 | * @param arb - Source arbitrary
|
12 | * @param numValues - Number of values to produce
|
13 | *
|
14 | * @remarks Since 2.5.0
|
15 | * @public
|
16 | */
|
17 | declare function clone<T, N extends number>(arb: Arbitrary<T>, numValues: N): Arbitrary<CloneValue<T, N>>;
|
18 | export { clone };
|