diff --git a/types/index.d.ts b/types/index.d.ts index 5c0c3ca40..3f8a3ff1c 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2204,7 +2204,6 @@ declare namespace math { * when number is > 1. */ pickRandom(array: T[]): T - pickRandom(array: T[], number: 1, weights?: number[]): T pickRandom(array: T[], number: number): T[] pickRandom(array: T[], number: number, weights: number[]): T[] @@ -5525,7 +5524,6 @@ declare namespace math { * @param weights An array of ints or floats */ pickRandom(array: T[]): MathJsChain - pickRandom(array: T[], number: 1, weights?: number[]): MathJsChain pickRandom(array: T[], number: number): MathJsChain pickRandom(array: T[], number: number, weights: number[]): MathJsChain diff --git a/types/index.ts b/types/index.ts index 2c7a4e589..06c88feb2 100644 --- a/types/index.ts +++ b/types/index.ts @@ -2256,7 +2256,7 @@ Random examples expectTypeOf(math.pickRandom(['a', { b: 10 }, 42])).toMatchTypeOf< string | number | { b: number } >() - expectTypeOf(math.pickRandom([1, 2, 3], 1)).toMatchTypeOf() + expectTypeOf(math.pickRandom([1, 2, 3])).toMatchTypeOf() expectTypeOf(math.pickRandom([1, 2, 3], 2)).toMatchTypeOf() expectTypeOf(math.chain().pickRandom([1, 2, 3], 2)).toMatchTypeOf>()