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

301
Views
La expresión 'nueva' de mecanografiado, cuyo objetivo carece de una firma de construcción, implícitamente tiene un tipo 'cualquiera'

En mi proyecto nextjs tengo este código:

 const go = new global.Go()

global.Go se define mediante wasm .

Cuando ejecuto el comando tsc me sale el siguiente error:

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

Así que creé los types/global.d.ts y agregué estas líneas:

 export declare global { function Go(): unknown }

pero ahora me sale este error:

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

¿Cómo puedo solucionar este problema?

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

0

Como dice el mensaje de error; darle una firma de construcción

 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!