/** * Configuration options for the {@link shuffle} function. */ export type ShuffleConfig = { /** * Target array. Defaults to the given array, shuffling in place. */ into?: T[] | undefined; /** * Generate a random real in the range [0..1). */ random01?: () => number; }; /** * Fisher-Yates shuffle. * Defaults to in-place sorting, but can sort into a new one via into. * @see {@link https://en.wikipedia.org/wiki/Fisher%E2%80%93Yates_shuffle | Fisher-Yates shuffle on Wikipedia} */ export declare const shuffle: (list: T[], { into, random01 }?: ShuffleConfig) => T[]; /** * Wrapper for the {@link shuffle} function which shuffles into * a new array, leaving the original intact. */ export declare const toShuffled: (list: T[], config?: Omit, "into"> | undefined) => T[]; //# sourceMappingURL=shuffle.d.ts.map