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

231
Views
La propiedad 'customerID' no existe en el tipo 'Ventana y tipo de globalThis'

Soy nuevo en la programación, construyendo un widget. Dentro del ciclo for aquí, tengo acceso al ID de cliente. Quiero usar este ID de cliente en otros módulos. Cómo hacer que esté disponible a nivel mundial.

 for (let i = 0; i < loaderObject.q.length; i++) { const item = loaderObject.q[i]; const methodName = item[0]; console.log(methodName); if (i === 0 && methodName !== 'init') { throw new Error( `Failed to start Widget [${instanceName}]. 'init' must be called before other methods.` ); } else if (i !== 0 && methodName === 'init') { continue; } const loaderObject = Object.assign(defaultConfig, item[1]); const clientID = loaderObject.clientID window.customerID = clientID ; // Is this right approach? switch (methodName) { case 'init': const loadedObject = Object.assign(defaultConfig, item[1]); if (loadedObject.debug) { console.log( `Starting widget [${instanceName}]`, loadedObject ); console.log( "clientID", loadedObject.clientID) }

estoy recibiendo este error

 Property 'customerID' does not exist on type 'Window & typeof globalThis'.

Quiero usar este CustomerID en otro módulo main.js. ¿Como hacer esto?

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!