Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

201
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!