jsbi.d.ts 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. export default class JSBI {
  2. private constructor(length: number, sign: boolean);
  3. private length: number;
  4. private sign: boolean;
  5. static BigInt(from: number|string|boolean|object): JSBI;
  6. toString(radix?: number): string;
  7. static toNumber(x: JSBI): number;
  8. static unaryMinus(x: JSBI): JSBI;
  9. static bitwiseNot(x: JSBI): JSBI;
  10. static exponentiate(x: JSBI, y: JSBI): JSBI;
  11. static multiply(x: JSBI, y: JSBI): JSBI;
  12. static divide(x: JSBI, y: JSBI): JSBI;
  13. static remainder(x: JSBI, y: JSBI): JSBI;
  14. static add(x: JSBI, y: JSBI): JSBI;
  15. static subtract(x: JSBI, y: JSBI): JSBI;
  16. static leftShift(x: JSBI, y: JSBI): JSBI;
  17. static signedRightShift(x: JSBI, y: JSBI): JSBI;
  18. static lessThan(x: JSBI, y: JSBI): boolean;
  19. static lessThanOrEqual(x: JSBI, y: JSBI): boolean;
  20. static greaterThan(x: JSBI, y: JSBI): boolean;
  21. static greaterThanOrEqual(x: JSBI, y: JSBI): boolean;
  22. static equal(x: JSBI, y: JSBI): boolean;
  23. static notEqual(x: JSBI, y: JSBI): boolean;
  24. static bitwiseAnd(x: JSBI, y: JSBI): JSBI;
  25. static bitwiseXor(x: JSBI, y: JSBI): JSBI;
  26. static bitwiseOr(x: JSBI, y: JSBI): JSBI;
  27. static asIntN(n: number, x: JSBI): JSBI;
  28. static asUintN(n: number, x: JSBI): JSBI;
  29. static ADD(x: any, y: any): any;
  30. static LT(x: any, y: any): boolean;
  31. static LE(x: any, y: any): boolean;
  32. static GT(x: any, y: any): boolean;
  33. static GE(x: any, y: any): boolean;
  34. static EQ(x: any, y: any): boolean;
  35. static NE(x: any, y: any): boolean;
  36. }