nowjs-core
Version:
NowCanDo Javascript Core [nowjs-core] is a library written by TypeScript code maintains under Apache 2.0 licence
22 lines (21 loc) • 840 B
TypeScript
export interface BigDecimalOptions {
decimals?: number;
}
export declare type NumericTypes = BigDecimal | number | string | bigint;
export declare class BigDecimal {
static readonly DEFAULT_PRECISION = 18;
bigint: bigint;
private options;
constructor(value: NumericTypes, options?: BigDecimalOptions);
static min(...bigDecimals: BigDecimal[]): BigDecimal;
static max(...bigDecimals: BigDecimal[]): BigDecimal;
static fromBigInt(bigint: bigint, options?: BigDecimalOptions): BigDecimal;
divide(value: NumericTypes): BigDecimal;
plus(value: NumericTypes): BigDecimal;
minus(value: NumericTypes): BigDecimal;
multiply(value: NumericTypes): BigDecimal;
power(value: string | number | bigint): BigDecimal;
sqrt(): bigint | BigDecimal;
private normalizeValue;
toString(): string;
}