Urara-Blog/node_modules/.pnpm-store/v3/files/1a/34aaafbc1492ee6cec338cbc683f982f57af9b0f9f1341ad8a7a1af5607943089a35356eaf348be2b160eeba0ed643aad88f1eb3af1c346ea976ddb6bbd77f
2022-08-14 01:14:53 +08:00

17 lines
450 B
Text

'use strict';
var GetIntrinsic = require('get-intrinsic');
var $BigInt = GetIntrinsic('%BigInt%', true);
var $TypeError = GetIntrinsic('%TypeError%');
var Type = require('../Type');
// https://262.ecma-international.org/11.0/#sec-numeric-types-bigint-bitwiseNOT
module.exports = function BigIntBitwiseNOT(x) {
if (Type(x) !== 'BigInt') {
throw new $TypeError('Assertion failed: `x` argument must be a BigInt');
}
return -x - $BigInt(1);
};