microsoft / microsoft/TypeScript
JSDoc support for @yields
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.3k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
It would be nice to be able to use the @yields JSDoc tag.
We work with JS and JSDoc, but taking advantage of TSC and VSCode.
We also use the valid-jsdoc eslint rule.
We have:
/** @typedef Thing (...) */
function* walkThings() {
//... some yield here and there
}
We want to
/**
* @yields {Thing}
*/
function* walkThings() {
//... some yield here and there
}
We can't do
/**
* @returns {IterableIterator<Something>}
*/
function* walkThings() {
//... some yield here and there
}
Because it doesn't return, but yields, and eslint complains about it. We can disable the rule here, but it is not the desirable scenario.
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
Es wird keine Repository-Datei und kein Test genannt. Beginne damit, TypeScripts bestehende JSDoc-Behandlung für Generatorfunktionen und @returns nachzuverfolgen, und vergleiche sie anschließend mit dem Beispiel @yields {Thing}. Als abgeschlossen gilt die Aufgabe, wenn das Tag mit dem vorgesehenen ausgelieferten Typ akzeptiert wird und durch gezielte Tests abgedeckt ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- javascript, typescript
- Bereich
- compilers, developer-experience
- Issue-Typ
- Feature
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Ruhig
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 48/100