import { t as Maybe } from "./Maybe-pvX1mStM.js"; //#region src/functions/sample/sample.d.ts /** * Returns a random item from the input iterable. * @param source The iterable to get a random item from. * @returns A random item from the input iterable. * @example * ```ts * sample([1, 2, 3]) // 2 * ``` */ declare function sample(source: Iterable): T; /** * Returns N random items from the input iterable. * If the input iterable has less than N items, all items will be returned. * @param source The iterable to get a random item from. * @param count The number of items to return. * @returns A random item from the input iterable. * @example * ```ts * sample([1, 2, 3], 2) // [2, 3] * sample([1, 2, 3], 4) // [1, 2, 3] * sample([1, 2, 3], 0) // [] * sample([1, 2, 3], -1) // [] * ``` */ declare function sample(source: Iterable, count: number): T[]; /** * Returns a random item from the input iterable. * @param source The iterable to get a random item from. * @returns A random item from the input iterable. * @example * ```ts * sample(null) // undefined * sample(undefined) // undefined * ``` */ declare function sample(source: Maybe>): T | undefined; /** * Returns N random items from the input iterable. * If the input iterable has less than N items, all items will be returned. * @param source The iterable to get a random item from. * @param count The number of items to return. * @returns A random item from the input iterable. * @example * ```ts * sample([1, 2, 3], 2) // [2, 3] * sample([1, 2, 3], 4) // [1, 2, 3] * sample([1, 2, 3], 0) // [] * sample([1, 2, 3], -1) // [] * ``` */ declare function sample(source: Maybe>, count: number): T[] | undefined; //#endregion export { sample as t }; //# sourceMappingURL=sample-BaYxYVvK.d.ts.map