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

203
Vistas
TS2554: Expected 0 arguments, but got 2

Here is a modified version of the code that I have.

return await this.X.y(
 a,
 b,
);

and the function y looks like this:

async y(
    a: string,
    b: B,
  ) {
    return await this.foo.put(
      `${this.config.foobar}/foo/${a}`,
      b,
    );

and I have been getting the error stated above. How is it possible for the function to expect 0 arguments when it has 2 specified with it?

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

0

There is obvious conflicts on the expected function being ran. Without no more code to see is difficult to be precise but from that example you gave, my wild guess is that either:

  1. this.foo.put() function does really takes no arguments
  2. you are thinking you are using a function but instead at runtime is another

Try to debug and get what is the prototype of this.foo and check again the function put() prototype also. I strongly think your line of thought scope is not the same of the running program, it is all about scope ;)

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