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

Global errors differ depending on initial state of playground #3032

Open
DanielRosenwasser opened this issue Feb 16, 2024 · 1 comment
Open
Labels
Playground Issues that affect the Playground

Comments

@DanielRosenwasser
Copy link
Member

I'm having a hard time consistently reproing this, so bare with me.

First, use es2020 as a target.

Playground for this example:

function foo() {
    await using asd = 123;
}

Playground for this example:

function foo() {
    //await using asd = 123;
}

In both cases, toggle a comment on the line in foo, and then toggle the comment state again.

Depending on the initial contents of the playground, the following errors will not reappear:

Cannot find global type 'AsyncDisposable'.(2318)
Cannot find global type 'Disposable'.(2318)

What's more, if you try applying a quick fix on the await keyword to add the async keyword to the function you may get different results than if you enter it manually.

@DanielRosenwasser DanielRosenwasser added the Playground Issues that affect the Playground label Feb 16, 2024
@fatcerberus
Copy link

bare with me

That would be “bear”. I don’t think anyone wants to do the former. 🚎 😉

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

No branches or pull requests

2 participants