The Javascript BigInt valueOf() method converts a BigInt object to a primitive value.
valueOf()
bigIntObj.valueOf()
Using valueOf
console.log(typeof Object(1n)); // object console.log(typeof Object(1n).valueOf()); // bigint console.log(typeof 1n);//from ww w. j a va2s . co m