I want to use BigInt in Typescript
private AND = (left: BitwiseNumber, right: BitwiseNumber) => {
return BigInt(left) & BigInt(right);
}
But it gave me this error:
src/dir/file-name.ts(190,10): error TS2304: Cannot find name 'BigInt'.
To solve this checked answer to this question which cited this document and suggested me to add "target": "esnext" & "lib": ["esnext.bigint"] in file tsconfig.json.
but my tsconfig.json file already has these values in target and lib as shown below:
"target": "es2018",
"lib": ["es2018"],
Now if I change value of target from es-2018 to esnext. It start throwing other errors. So, My question can I still use BigInt in version 3.1.6? If Not is there any alternate for BigInt in this version?
My Typescript version is 3.1.6