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

87
Views
Errores mecanografiados sobre lo que debería ser un objeto básico

Tengo el siguiente error en mi texto mecanografiado y no tengo idea de cómo solucionarlo.

El parámetro 'clave' implícitamente tiene un tipo 'cualquiera'.

A continuación se muestra mi código, no entiendo completamente el problema, incluso si any escribo, aparece el error.

 let store = {}; return { getItem: (key) => { return store[key] || null; }, setItem: (key, value) => { store[key] = value.toString(); }, removeItem: (key) => { delete store[key]; }, clear: () => { store = {}; }, }; };
about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

La solución fue escribir la tecla en el punto de creación del objeto.

 const fakeLocalStorage = () => { let store: { [key: string]: string } = {}; return { getItem: (key: string) => { return store[key] || null; }, setItem: (key: string, value: string) => { store[key] = value.toString(); }, removeItem: (key: string) => { delete store[key]; }, clear: () => { store = {}; }, }; };
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!