I have simple TS project where this is my tsconfig.json
{
"compilerOptions": {
"target": "es2020",
"lib": ["es2020"],
}
}
And I have one file, script.ts
with following code inside
BigInt(2);
Unfortunatelly, when I execute tsc script.ts
, I receive this error:
Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.
Why is that happening? Isn't my library set to correct version?