import {RNGFunction} from './types'; type WeightedRandomIndexOptions = { rng: RNGFunction; getWeight: (item: T, index?: number) => number; }; type WeightedRandomIndexFunction = (array: Array) => number; type CachedWeightedRandomIndexFunction = () => number; declare const weightedRandomIndex: { (array: Array): number; createWeightedRandomIndex( rng: RNGFunction ): WeightedRandomIndexFunction; createWeightedRandomIndex( options: WeightedRandomIndexOptions ): WeightedRandomIndexFunction; createCachedWeightedRandomIndex( rng: RNGFunction, array: Array ): CachedWeightedRandomIndexFunction; createCachedWeightedRandomIndex( options: WeightedRandomIndexOptions, array: Array ): CachedWeightedRandomIndexFunction; }; export function createWeightedRandomIndex( rng: RNGFunction ): WeightedRandomIndexFunction; export function createWeightedRandomIndex( options: WeightedRandomIndexFunction ): WeightedRandomIndexFunction; export function createCachedWeightedRandomIndex( rng: RNGFunction, array: Array ): CachedWeightedRandomIndexFunction; export function createCachedWeightedRandomIndex( options: WeightedRandomIndexOptions, array: Array ): CachedWeightedRandomIndexFunction; export default weightedRandomIndex;