Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

164
Vistas
Ionic, Js, React Function Call without callling

Alright, so I have this function:

const savedFile = await Filesystem.writeFile({
  path: fileName,
  data: base64Data,
  directory: Directory.Data,
});

Now the thing that is puzzling me is the fact that the code inside this function is ran even though I don't have a call to it anywhere in my application.

I get this eslint message:

'savedFile' is declared but its value is never read.ts(6133)
'savedFile' is assigned a value but never used.eslint@typescript-eslint/no-unused-vars

Can someone please explain to me how is it tit works in this way and why?

Thanks!

What I assume is the correct way to interpret it is that the savedFile const is only a variable that holds the return value of the async call. Is that correct?

about 4 years ago · Santiago Gelvez
1 Respuestas
Responde la pregunta

0

This eslint error is telling you that const savedFiles is not being used anywhere else besides the code you provided. If savedFiles is being assigned inside your function is it actually being used anywhere else in that function like return savedfiles Yes savedFiles holds the value returned from the async function call await Filesystem.writeFile()

// savedFiles is declared but not being used or (accessed) for its value
const savedFile = await Filesystem.writeFile({ 
  path: fileName,
  data: base64Data,
  directory: Directory.Data,
});
about 4 years ago · Santiago Gelvez Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda