microsoft / microsoft/TypeScript-Website
Global errors differ depending on initial state of playground
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 2.6k
- Forks
- 1.5k
- Avg merge
- 2d 2h
- Merged PRs (30d)
- 7
Description
I'm having a hard time consistently reproing this, so bare with me.
First, use es2020 as a target.
function foo() {
await using asd = 123;
}
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the two linked Playground examples using the es2020 target, then reproduce the comment toggling sequence in foo. Compare whether the AsyncDisposable and Disposable diagnostics and the await quick-fix remain consistent after each toggle; done means both initial states produce the same errors and quick-fix result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100