diff --git a/README.md b/README.md index 9f8d12e..f59a9cf 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,7 @@ An arbitrary-precision Decimal type for JavaScript. [![npm version](https://img.shields.io/npm/v/decimal.js.svg)](https://www.npmjs.com/package/decimal.js) [![npm downloads](https://img.shields.io/npm/dw/decimal.js)](https://www.npmjs.com/package/decimal.js) [![CDNJS](https://img.shields.io/cdnjs/v/decimal.js.svg)](https://cdnjs.com/libraries/decimal.js) +[![](https://data.jsdelivr.com/v1/package/npm/decimal.js/badge)](https://www.jsdelivr.com/package/npm/decimal.js)
diff --git a/decimal.d.ts b/decimal.d.ts index 338dc56..526a896 100644 --- a/decimal.d.ts +++ b/decimal.d.ts @@ -36,7 +36,7 @@ export namespace Decimal { export type Instance = Decimal; export type Rounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; export type Modulo = Rounding | 9; - export type Value = string | number | Decimal; + export type Value = string | number | bigint | Decimal; // http://mikemcl.github.io/decimal.js/#constructor-properties export interface Config { @@ -63,7 +63,7 @@ export declare class Decimal { abs(): Decimal; ceil(): Decimal; - + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; clamp(min: Decimal.Value, max: Decimal.Value): Decimal; diff --git a/decimal.global.d.ts b/decimal.global.d.ts index ddc5109..a3162a3 100644 --- a/decimal.global.d.ts +++ b/decimal.global.d.ts @@ -56,7 +56,7 @@ declare global { type DecimalInstance = Decimal; type DecimalConstructor = typeof Decimal; -type DecimalValue = string | number | Decimal; +type DecimalValue = string | number | bigint |Decimal; type DecimalRounding = 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8; type DecimalModulo = DecimalRounding | 9; @@ -84,7 +84,7 @@ export declare class Decimal { abs(): Decimal; ceil(): Decimal; - + clampedTo(min: Decimal.Value, max: Decimal.Value): Decimal; clamp(min: Decimal.Value, max: Decimal.Value): Decimal;