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

132
Vistas
Can we use Buffer.from in typescript frontend code

Can we use Buffer.from to Base 64 encode a string in a front end typescript application. Using btoa() is showing as deprecated.

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

No you cannot. Buffer is a Node.js specific class and it does not exist in browsers.

about 4 years ago · Juan Pablo Isaza Denunciar

0

The warning is beacause you have node types in your proyect, so Typescript Compiler thinks that you're using atob in node (which is totally deprecated) but you don't. You are totally fine using atob in front-end.

To solve the warning you can remove node types (if you're not using them), or to make it simple, a comentary before your atob call should be enought to avoid any warning from the next line:

// @ts-ignore
Your atob call goes here

Make sure you keep it simple under the @ts-ignore, you don't want to hidde a real problem there.

about 4 years ago · Juan Pablo Isaza 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