mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-11 12:30:18 +00:00
[@types/mathjs] fill out BigNumber and Fraction interfaces
This commit is contained in:
Vendored
+10
-9
@@ -1,9 +1,12 @@
|
||||
import { Decimal } from 'decimal.js';
|
||||
// Type definitions for mathjs
|
||||
// Project: http://mathjs.org/
|
||||
// Definitions by: Ilya Shestakov <https://github.com/siavol>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
declare var math: mathjs.IMathJsStatic;
|
||||
export as namespace math;
|
||||
export = math;
|
||||
|
||||
declare namespace mathjs {
|
||||
|
||||
@@ -304,7 +307,7 @@ declare namespace mathjs {
|
||||
* @param x The base
|
||||
* @param y The exponent
|
||||
*/
|
||||
pow(x: number|BigNumber|Complex|MathArray|Matrix, y: number|BigNumber|Complex): number|BigNumber|Complex|MathArray|Matrix;
|
||||
pow(x: MathType, y: number|BigNumber|Complex): MathType;
|
||||
|
||||
/**
|
||||
* Round a value towards the nearest integer. For matrices, the function is evaluated element wise.
|
||||
@@ -1333,12 +1336,14 @@ declare namespace mathjs {
|
||||
swapRows(i: number, j: number): Matrix;
|
||||
}
|
||||
|
||||
export interface BigNumber {
|
||||
export interface BigNumber extends Decimal {
|
||||
|
||||
}
|
||||
|
||||
export interface Fraction {
|
||||
|
||||
s: number;
|
||||
n: number;
|
||||
d: number;
|
||||
}
|
||||
|
||||
export interface Complex {
|
||||
@@ -1349,9 +1354,9 @@ declare namespace mathjs {
|
||||
}
|
||||
|
||||
export interface IPolarCoordinates {
|
||||
r: number;
|
||||
r: number;
|
||||
phi: number;
|
||||
}
|
||||
}
|
||||
|
||||
export interface Unit {
|
||||
to(unit: string): Unit;
|
||||
@@ -2309,7 +2314,3 @@ declare namespace mathjs {
|
||||
toString(): string;
|
||||
}
|
||||
}
|
||||
|
||||
declare module 'mathjs'{
|
||||
export = math;
|
||||
}
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"decimal.js": "^10.0.0"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user