microsoft / microsoft/TypeScript
Explicit any type in for..in loop
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 2 T. 4 Std.
- Gemergte PRs (30 T.)
- 132
Beschreibung
For the reason of consistency, it should be possible to explicitly annotate the iterator variable at least with the "any" type in a for..in loop.
*Edit from @sandersn: Fixes should apply to JSDoc too: https://github.com/microsoft/TypeScript/issues/43756, and perhaps allow annotations on `for .. of` too*
Beitragsleitfaden
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
Das Issue nennt keine Quelldateien oder Tests. Beginne damit, die Parser- und Checker-Pfade für `for..in`-Iteratordeklarationen zu finden, und prüfe anschließend das zugehörige JSDoc-Issue #43756 sowie vorhandene Tests für Annotationen von Schleifenvariablen. Als erledigt gilt, dass explizites `any` in der angeforderten `for..in`-Syntax konsistent akzeptiert wird und der JSDoc-Fall wie angegeben behandelt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- compilers
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100