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

152
Views
Intellisense show wrong properties for a Promise inside `async` method

I've noticed that, when a Promise is used inside an async method, a lot of properties which should be in the IntelliSense are actually there.
Take this simple code for example (i'm using REACT and I'm inside a Hook component, just for give you a context).

const notAsyncMethod = () => {
    let a : Promise<string> = new Promise(null);
}

const asyncMethod = async () => {
    let a : Promise<string> = new Promise(null);
}

Now, in the first case, this is the IntelliSense suggestions: enter image description here

Which is exactly what I expect.

Then, in the second case, this is what IntelliSense suggests me: enter image description here

Why is this happening? Is it normal, or there might be some problem with my code? And, if this is how it should work.. Why is this happening, and from what those properties are coming?

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