7a0ed4408f1e71461cbc201f84bb06f923e55953502d21de4e44f5d871b9aed0a42b430c9d6bcf2e5654b4f276307db1b210028842e6abcbfe2d7426893be0 381 B

1234567891011121314
  1. 'use strict';
  2. var $TypeError = require('es-errors/type');
  3. // https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
  4. module.exports = function BigIntAdd(x, y) {
  5. if (typeof x !== 'bigint' || typeof y !== 'bigint') {
  6. throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
  7. }
  8. // shortcut for the actual spec mechanics
  9. return x + y;
  10. };