import { Decimal } from "decimal.js"; //#region src/precision-number.d.ts type PrecisionNumberValue = Decimal.Value | PrecisionNumber | { toString: () => string; }; /** * Class representing a precision number with configurable decimal places and rounding. * * This class leverages the Decimal.js library to ensure accurate arithmetic operations * with floating point numbers. It provides methods for various arithmetic operations * (addition, subtraction, multiplication, division) as well as comparison and utility * methods to check the state of the number (e.g., if it is finite, an integer, zero, etc.). * * The class also includes custom symbol methods to support Node.js inspection and primitive * type conversion. * * The class supports in-place modification methods that alter the current instance's value, * such as `plus`, `minus`, `times`, `dividedBy`, and others. Additionally, methods prefixed * with `to` (e.g., `toPlus`, `toMinus`) return a new instance of `PrecisionNumber` with the * modified value, leaving the original instance unchanged. */ declare class PrecisionNumber { #private; constructor(value?: PrecisionNumberValue, decimalPlaces?: number, rounding?: Decimal.Rounding); [Symbol.toPrimitive](hint: string): string | number; get value(): string; static toFixed(value: PrecisionNumberValue, decimalPlaces?: number, rounding?: Decimal.Rounding): string; absoluteValue(): this; dividedBy(value: PrecisionNumberValue): this; equals(value: PrecisionNumberValue): boolean; gt(value: PrecisionNumberValue): boolean; gte(value: PrecisionNumberValue): boolean; isFinite(): boolean; isInteger(): boolean; isNaN(): boolean; isNegative(): boolean; isPositive(): boolean; isZero(): boolean; lt(value: PrecisionNumberValue): boolean; lte(value: PrecisionNumberValue): boolean; minus(value: PrecisionNumberValue): this; negate(): this; plus(value: PrecisionNumberValue): this; times(value: PrecisionNumberValue): this; toAbsoluteValue(): PrecisionNumber; toDividedBy(value: PrecisionNumberValue): PrecisionNumber; toJSON(): string; toMinus(value: PrecisionNumberValue): PrecisionNumber; toNegated(): PrecisionNumber; toPlus(value: PrecisionNumberValue): PrecisionNumber; toString(): string; toFixed(decimalPlaces?: number, rounding?: Decimal.Rounding): string; toTimes(value: PrecisionNumberValue): PrecisionNumber; } //#endregion export { PrecisionNumber, PrecisionNumberValue }; //# sourceMappingURL=precision-number.d.ts.map