microsoft / microsoft/TypeScript-Website
Global errors differ depending on initial state of playground
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 2.6k
- Forks
- 1.5k
- Ø Merge
- 2 T. 2 Std.
- Gemergte PRs (30 T.)
- 7
Beschreibung
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.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Beginne mit den beiden verknüpften Playground-Beispielen mit dem Ziel es2020 und reproduziere dann die Sequenz zum Umschalten der Kommentare in foo. Vergleiche, ob die Diagnosen für AsyncDisposable und Disposable sowie der await-Quick-Fix nach jedem Umschalten konsistent bleiben; fertig ist die Aufgabe, wenn beide Ausgangszustände dieselben Fehler und dasselbe Quick-Fix-Ergebnis erzeugen.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 38/100