Skip to content

Commit

Permalink
Improve type definitions of function hypot (#3144)
Browse files Browse the repository at this point in the history
* Addressed silentmissile's comment in #3125

* Added method overload to index.d.ts, have to revert commit due to changes to package-lock.json with using npm install to run the unit tests & lint tests
  • Loading branch information
Hudsxn authored Jan 31, 2024
1 parent c60f637 commit 270559a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,8 @@ export interface MathJsInstance extends MathJsFactory {
* whole matrix.
* @returns Returns the hypothenuse of the input values.
*/
hypot<T extends (number | BigNumber)[]>(...args: T[]): T
hypot<T extends number | BigNumber>(...args: T[]): T
hypot<T extends number | BigNumber>(args: T[]): T

/**
* Calculate the least common multiple for two or more values or arrays.
Expand Down

0 comments on commit 270559a

Please sign in to comment.