export declare class Balance { private _value; constructor(_value: number); static from(...args: number[]): Balance; get debit(): number; get credit(): number; [Symbol.toPrimitive](hint: string): string | number; isDebit(): boolean; isPositive(): boolean; isZero(): boolean; isCredit(): boolean; isNegative(): boolean; valueOf(): number; abs(): number; /** * Modify the current value with the given value by increasing the total value by that much * @param value number | Balance */ add(value: number): Balance; add(value: Balance): Balance; /** * Modify the balance value by the given amount, by decresing the total by that much * @param value number | Balance */ reduce(value: number): Balance; reduce(value: Balance): Balance; /** * Divide the current value without modifying its state and return the result. * if you want to modify the state then use divide * * @note any function with the By suffix do not modify the current value. It will return a new value. * @param value */ divideBy(value: Balance): number; divideBy(value: number): number; /** * Add a number to the current balance without modifying the balance itself. * @param value Number * @returns Balance */ addTo(value: number): Balance; addTo(value: Balance): Balance; addTo(...value: Array): Balance; /** * Reduce the incoming amounts by the current value without modifying the current value * @param value number * @returns Balance * @example * let amt = balance(1000); * let result = amt.minusFrom(100); * console.log(result.valuOf()); // 900 * console.log(amt.valueOf()); //1000 * */ minusFrom(value: number): Balance; minusFrom(value: Balance): Balance; minusFrom(...value: Array): Balance; format(options?: { showDecimal: boolean; }): string; currency(options?: { showDecimal: boolean; }): string; toString(): string; private static _sum; } export declare const balance: (value: number) => Balance; //# sourceMappingURL=Balance.d.ts.map