Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

328
Views
No puedo usar BigInt en el proyecto TS independientemente de es2020

Tengo un proyecto TS simple donde este es mi tsconfig.json

 { "compilerOptions": { "target": "es2020", "lib": ["es2020"], } }

Y tengo un archivo, script.ts con el siguiente código dentro

BigInt(2);

Desafortunadamente, cuando ejecuto tsc script.ts , recibo este error: Cannot find name 'BigInt'. Do you need to change your target library? Try changing the 'lib' compiler option to 'es2020' or later.

¿Por qué está pasando eso? ¿Mi biblioteca no está configurada en la versión correcta?

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

BigInt es una característica relativamente nueva en Typescript, por lo que para usarlo debe especificar target: esnext en su tsconfig.json

En su código puede crear BigInt con el sufijo n , así:

 const bigIntNumber = 1n
about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!