Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

207
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda