UNPKG

436 BTypeScriptView Raw
1import { Engine } from "../types";
2/**
3 * Returns a random value within the provided `source` within the sliced
4 * bounds of `begin` and `end`.
5 * @param source an array of items to pick from
6 * @param begin the beginning slice index (defaults to `0`)
7 * @param end the ending slice index (defaults to `source.length`)
8 */
9export declare function pick<T>(engine: Engine, source: ArrayLike<T>, begin?: number, end?: number): T;