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

18 lines
469 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-subtract
module.exports = function BigIntSubtract(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;
};