Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

class implements Awaited<any> [bug] #60568

Open
MaxmaxmaximusFree opened this issue Nov 23, 2024 · 1 comment
Open

class implements Awaited<any> [bug] #60568

MaxmaxmaximusFree opened this issue Nov 23, 2024 · 1 comment

Comments

@MaxmaxmaximusFree
Copy link

🔎 Search Terms

implements Awaited bug

🕗 Version & Regression Information

  • This changed between versions ______ and _______
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

No response

💻 Code

This works:

async function test() {

    class Cat implements Awaited<any> {
    
    }

    await new Cat()
}

but This error:

async function test() {

    class Cat implements Awaited<any> {
        then(){ }
    }

    await new Cat()
}

Image

🙁 Actual behavior

bug

🙂 Expected behavior

normal await

Additional information about the issue

No response

@MartinJohns
Copy link
Contributor

MartinJohns commented Nov 23, 2024

You forgot to fill out the issue template.

What makes you think this is a bug? The error message indicates this is intentional. Also, Awaited<any> resolves to get any, so you're trying to implement any.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants