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

313
Views
Typescript 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type

In my nextjs project I have this code:

const go = new global.Go()

global.Go is defined through wasm.

When I run the tsc command I get the following error:

error TS7017: Element implicitly has an 'any' type because type 'typeof globalThis' has no index signature.

So I've created the file types/global.d.ts and I have add these lines:

export declare global {
  function Go(): unknown
}

but now I get this error:

error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type.

How can I solve this issue?

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

0

Like the error message says; give it a construct signature

export declare global {
  const Go: new () => Go
}
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!