diff --git a/test/typescript-tests/testTypes.ts b/test/typescript-tests/testTypes.ts index 2f6efe1c92..abb5c2c6d3 100644 --- a/test/typescript-tests/testTypes.ts +++ b/test/typescript-tests/testTypes.ts @@ -2543,6 +2543,12 @@ Statistics functions' return types >() expectTypeOf(math.quantileSeq([1, 2, 3], 0.75)).toMatchTypeOf() + expectTypeOf(math.quantileSeq([1, 2, 3, 4, 5], [0.25, 0.75])).toMatchTypeOf< + MathArray | MathScalarType + >() + expectTypeOf( + math.quantileSeq([1, 2, 3, 4, 5], [0.25, 0.75]) as number[] + ).toMatchTypeOf() expectTypeOf(math.quantileSeq([[1, 2, 3]], 0.75)).toMatchTypeOf() expectTypeOf( math.quantileSeq([math.bignumber('123')], 0.75) diff --git a/types/index.d.ts b/types/index.d.ts index f73a6be38a..d6abde3eb5 100644 --- a/types/index.d.ts +++ b/types/index.d.ts @@ -2866,7 +2866,7 @@ export interface MathJsInstance extends MathJsFactory { */ quantileSeq( A: T[] | T[][], - prob: number | BigNumber | MathArray, + prob: number | BigNumber, sorted?: boolean ): T /**