UNPKG

pandemonium

Version:

Typical random-related functions for JavaScript.

20 lines (15 loc) 469 B
import {RNGFunction} from './types'; type SampleWithReplacementsFunction<T> = ( k: number, array: Array<T> ) => Array<T>; declare const naiveSampleWithReplacements: { <T>(k: number, array: Array<T>): Array<T>; createSampleWithReplacements<T>( rng: RNGFunction ): SampleWithReplacementsFunction<T>; }; export function createSampleWithReplacements<T>( rng: RNGFunction ): SampleWithReplacementsFunction<T>; export default naiveSampleWithReplacements;