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

156
Vistas
Export webpack function in typescript

The webpack docs show the type to be return from configuration function, but not the types of the parameters env and argv. Currently I've to type them as any, however what are the actual types of env and argv?

const configuration = (env: any, argv: any): Configuration => ({
  mode: 'production',
  entry: './foo.js',
  output: {
    path: path.resolve(__dirname, 'dist'),
    filename: 'foo.bundle.js',
  },
  ...
});
about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

They are both any because they are both coming from the webpack cli arguments, so it is not possible to know the type in advance at compile time (unless you strictly know that you will always pass certain arguments and force the type to be what you declare it to be)

Webpack Environment Variables docs may help to understand better.

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