type/consts.ts

  1. /**
  2. * Type constants.
  3. *
  4. * @module type
  5. * @license Apache-2.0
  6. * @copyright Mat. 2018-present
  7. */
  8. /**
  9. * Maximum representable safe integer in JavaScript.
  10. *
  11. * @name maxInt
  12. */
  13. export const maxInt = Number.MAX_SAFE_INTEGER ?? 2 ** 53 - 1;
  14. /**
  15. * Minimum representable safe integer in JavaScript.
  16. *
  17. * @name minInt
  18. */
  19. export const minInt = Number.MIN_SAFE_INTEGER ?? -(2 ** 53) + 1;