microsoft / microsoft/TypeScript
Compiler "target" option capitalization in docs inconsistent with code and json schema
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
https://github.com/Microsoft/TypeScript/wiki/Compiler-Options
says --target can take the value ES5 (uppercase).
Visual Studio Code warns about using the uppercase one in your tsconfig.json, presumably because it's following the schema.
The JSON schema for tsconfig.json also has it in lowercase, but the docs (https://github.com/Microsoft/TypeScript/wiki/tsconfig.json#details) refer you to the first page (which uses uppercase) for the values.
My guess at fixing the problem:
From the source it appears the value ought to be lowercase:
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/commandLineParser.ts#L221
I think the fix is to use lowercase in the docs (the first page).
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
Öffne die Compiler Options-Wiki-Seite und vergleiche deren --target-Werte mit der tsconfig.json-Dokumentation, dem JSON-Schema und dem referenzierten Eintrag in src/compiler/commandLineParser.ts. Aktualisiere die Dokumentation, sodass die Groß- und Kleinschreibung mit Schema und Code übereinstimmt, und prüfe anschließend, dass die verlinkte Dokumentation keine widersprüchlichen Hinweise mehr gibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- documentation
- Issue-Typ
- Dokumentation
- Schwierigkeit
- 1/5
- Geschätzter Aufwand
- Unter einer Stunde
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 45/100