interface.d.ts 614 B

1234567891011121314151617
  1. export declare type ValueType = string | number;
  2. export interface DecimalClass {
  3. add: (value: ValueType) => DecimalClass;
  4. multi: (value: ValueType) => DecimalClass;
  5. isEmpty: () => boolean;
  6. isNaN: () => boolean;
  7. isInvalidate: () => boolean;
  8. toNumber: () => number;
  9. /**
  10. * Parse value as string. Will return empty string if `isInvalidate`.
  11. * You can set `safe=false` to get origin string content.
  12. */
  13. toString: (safe?: boolean) => string;
  14. equals: (target: DecimalClass) => boolean;
  15. lessEquals: (target: DecimalClass) => boolean;
  16. negate: () => DecimalClass;
  17. }