export interface WeightedItem { value: T; weight: number; } /** * Returns a random element using cumulative weights and binary search. * Items with non-positive weights are skipped from the pool. * * @template T - Element type * @param {readonly WeightedItem[]} items - Items with non-negative weights * @returns {T} A randomly selected element * @example * weightedChoice([{ value: "a", weight: 1 }, { value: "b", weight: 4 }]); */ export declare const weightedChoice: (items: readonly WeightedItem[]) => T;