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

117
Views
TypeScript cómo llamar a la función con su nombre

Soy nuevo en mecanografiar, cuando escribo: (el diálogo se importa de una biblioteca)

 ipcMain.handle("openDialog", (event, method, config) => { return dialog[method](window, config); });

Está funcionando en javascript pero lanza Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'Dialog' en mecanografiado.
Después de encontrar algunas soluciones en línea, ninguna de ellas puede resolver este error por mí.
Eso es lo que tengo ahora:

 ipcMain.handle("openDialog", (event : any, method : keyof Electron.Dialog, config : any) => { return dialog[method](window, config); });

y solo obtuve:

 This expression is not callable. Each member of the union type '{ (browserWindow: BrowserWindow, options: CertificateTrustDialogOptions): Promise<void>; (options: CertificateTrustDialogOptions): Promise<...>; } | ... 6 more ... | { ...; }' has signatures, but none of those signatures are compatible with each other.

¿Alguna solución?

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!