/** * Generates a random subset of an array. * * @template T - The type of elements in the array. * @param array - The source array. * @param minSize - Minimum size of the subset (default: 1). * @param maxSize - Maximum size of the subset (default: array.length). * @param allowDuplicates - Whether to allow duplicate elements (default: false). * @returns A random subset of the array. * * @throws {Error} If array is empty or size constraints are invalid. * * @example * // Random subset of 2-4 elements * randomSubset([1, 2, 3, 4, 5], 2, 4); // [3, 1, 5] * * @example * // Any size subset (1 to array.length) * randomSubset(['a', 'b', 'c', 'd']); // ['b', 'd'] * * @example * // With duplicates * randomSubset([1, 2, 3], 2, 5, true); // [2, 1, 2, 3] * * @complexity Time: O(n), Space: O(n) where n is subset size */ export declare function randomSubset(array: T[], minSize?: number, maxSize?: number, allowDuplicates?: boolean): T[]; //# sourceMappingURL=randomSubset.d.ts.map