Urara-Blog/node_modules/.pnpm-store/v3/files/dc/f05948f435b4bab2a330393f3255b3abee7f465e30850aa7165ea98ddb7820ed0443e8d9c18a2a2c9a2c8d42cc22d8cef4e6f781186f414912cc32f78b1625
2022-08-14 01:14:53 +08:00

18 lines
459 B
Text

'use strict';
var GetIntrinsic = require('get-intrinsic');
var $TypeError = GetIntrinsic('%TypeError%');
var Type = require('../Type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-add
module.exports = function BigIntAdd(x, y) {
if (Type(x) !== 'BigInt' || Type(y) !== 'BigInt') {
throw new $TypeError('Assertion failed: `x` and `y` arguments must be BigInts');
}
// shortcut for the actual spec mechanics
return x + y;
};