Skip to content

types: quantileSeq expands types unnecessarily #3197

@domdomegg

Description

@domdomegg

Describe the bug

The types for quantileSeq have an overly wide return type.

To Reproduce

// Type 'number | BigNumber | Unit | MathArray' is not assignable to type 'number'.
//   Type 'BigNumber' is not assignable to type 'number'.ts(2322)
const value: number = math.quantileSeq([1, 2, 3], 0.90);

I think value here should always be a number. This is the behaviour of for example math.mean and math.median.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions