/** * Selects a random sample of elements from an array without replacement. * * @template T - The type of array elements. * @param array - The array to sample from. * @param count - The number of elements to sample. * @returns An array of randomly selected elements (without duplicates). * * @throws {Error} If array is empty. * @throws {Error} If count is NaN. * @throws {Error} If count is negative or not an integer. * @throws {Error} If count is greater than array length. * * @example * // Pick 3 random numbers * randomSample([1, 2, 3, 4, 5], 3); // [2, 5, 1] * * @example * // Pick random cards * randomSample(['♠', '♣', '♥', '♦'], 2); // ['♥', '♠'] * * @example * // Pick all elements (shuffled) * randomSample([1, 2, 3], 3); // [3, 1, 2] * * @note Uses Fisher-Yates shuffle algorithm for unbiased sampling. * @note Does not modify the original array. * @note Elements in result maintain relative order from original array. * * @complexity Time: O(n), Space: O(n) where n is count */ export declare function randomSample(array: T[], count: number): T[]; //# sourceMappingURL=randomSample.d.ts.map