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

216
Views
Why Typescript compiler adds extra (0, expression) to output?

Lately I had to debug a test that had been written in TypeScript and has been run via ts-mocha. So, actually I had to debug the transpiler output sorta directly. And in lines like this:

(0, expect_1.default)(loadedTask.name).toBe(newTask.name);

only this (0, expression) wrapping got me confused. What is purpose of this (0, expr) wrapping? What JS gotcha this wrapping should prevent or workaround?

Thanks for your answers and time.

about 4 years ago · Juan Pablo Isaza
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!