'Getting error exponentiation operator for BigInt
When i am trying to do
(BigInt(Generator) ** this.privateKey) % BigInt(Prime)
i am getting error: Exponentiation cannot be performed on 'bigint' values unless the 'target' option is set to 'es2016' or later.
my tsconfig.json
{
"compilerOptions": {
"target": "es2020",
"lib": ["es2020", "esnext", "dom"],
/* Modules */
"module": "commonjs",
"types": ["./node_modules/user-agent-data-types", "node"],
"esModuleInterop": true,
"forceConsistentCasingInFileNames": true,
/* Type Checking */
"strict": true,
/* Completeness */
"skipLibCheck": true
}
}
changing target to esnext changes nothing
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|