From eb2efa06fb62c030c14e79b577b65ac4d9de63c8 Mon Sep 17 00:00:00 2001 From: Michael Mclaughlin Date: Thu, 14 Dec 2017 10:28:30 +0000 Subject: [PATCH] #78 Typings: remove toFormat --- decimal.d.ts | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/decimal.d.ts b/decimal.d.ts index 66a3f41..9d7251a 100644 --- a/decimal.d.ts +++ b/decimal.d.ts @@ -14,7 +14,6 @@ // type Decimal.Rounding // type Decimal.Value // interface Decimal.Config -// interface Decimal.Format // // Example (alternative syntax commented-out): // @@ -35,7 +34,6 @@ export default Decimal; export namespace Decimal { export type Config = DecimalConfig; export type Constructor = DecimalConstructor; - export type Format = DecimalFormat; export type Instance = DecimalInstance; export type Modulo = DecimalModulo; export type Rounding = DecimalRounding; @@ -49,7 +47,6 @@ declare global { namespace Decimal { type Config = DecimalConfig; type Constructor = DecimalConstructor; - type Format = DecimalFormat; type Instance = DecimalInstance; type Modulo = DecimalModulo; type Rounding = DecimalRounding; @@ -73,22 +70,9 @@ interface DecimalConfig { maxE?: number; crypto?: boolean; modulo?: DecimalModulo; - - // Requires `toFormat` . - format?: DecimalFormat; defaults?: boolean; } -// Requires `toFormat`. -interface DecimalFormat { - decimalSeparator?: string; - groupSeparator?: string; - groupSize?: number; - secondaryGroupSize?: number; - fractionGroupSeparator?: string; - fractionGroupSize?: number; -} - export declare class Decimal { readonly d: number[]; readonly e: number; @@ -231,9 +215,6 @@ export declare class Decimal { toFixed(decimalPlaces?: number): string; toFixed(decimalPlaces: number, rounding: DecimalRounding): string; - // Requires `toFormat`. - toFormat?(decimalPlaces: number, rounding: DecimalRounding): string; - toFraction(max_denominator?: DecimalValue): Decimal[]; toHexadecimal(significantDigits?: number): Decimal @@ -296,10 +277,7 @@ export declare class Decimal { static min(...n: DecimalValue[]): Decimal static mod(x: DecimalValue, y: DecimalValue): Decimal static mul(x: DecimalValue, y: DecimalValue): Decimal - - // Browser only - static noConflict(): DecimalConstructor; - + static noConflict(): DecimalConstructor; // Browser only static pow(base: DecimalValue, exponent: DecimalValue): Decimal static random(significantDigits?: number): Decimal static round(n: DecimalValue): Decimal @@ -325,9 +303,6 @@ export declare class Decimal { static readonly crypto: boolean; static readonly modulo: DecimalModulo; - // Requires `toFormat`. - static readonly format?: DecimalFormat; - static readonly ROUND_UP: 0; static readonly ROUND_DOWN: 1; static readonly ROUND_CEIL: 2;