/** * Returns a random element from the given array. * * Example: * * ```ts * import { sample } from "https://deno.land/std@$STD_VERSION/collections/mod.ts" * import { assert } from "https://deno.land/std@$STD_VERSION/testing/asserts.ts"; * * const numbers = [1, 2, 3, 4]; * const random = sample(numbers); * * assert(numbers.includes(random as number)); * ``` */ export declare function sample(array: readonly T[]): T | undefined; export { }