microsoft / microsoft/TypeScript
capitalization of es2017 in error message does not match capitalization of ES2017 autocomplete suggestion
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 14.4k
- Ø Merge
- 1 T. 19 Std.
- Gemergte PRs (30 T.)
- 117
Beschreibung
If the maintainers of this repository think this issue is worth considering, I would like to contribute the fix for it.
Bug Report
🔎 Search Terms
"capital ES" "capitalization ES"
🕗 Version & Regression Information
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about capitalization.
⏯ Playground Link
Playground link with relevant code
💻 Code
const myObj = {};
Object.values(myObj);
with "Target:" set to a pre-ES2017 example, like ES5.
🙁 Actual behavior
On hover, the error message says, "Property 'values' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the lib compiler option to 'es2017' or later.(2550)"
The capitalization in this error message does not match the auto-generated capital "ES2017" suggestion in VSCode when filling out the lib compiler option.
🙂 Expected behavior
For consistency, I think the error message should say, "Property 'values' does not exist on type 'ObjectConstructor'. Do you need to change your target library? Try changing the lib compiler option to 'ES2017' or later.(2550)", instead.
Here, the capital "ES2017" matches the suggested "ES2017" that appears when typing in a tsconfig.json file in VSCode.
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
Beginne mit der Suche in den TypeScript-Compilerdiagnosen nach dem gemeldeten Object.values-Fehler und reproduziere ihn mit dem verlinkten Playground-Code, der auf ES5 abzielt. Bestätige, dass die Diagnose dieselbe ES2017-Großschreibung verwendet, die auch von der VSCode-Vervollständigung angezeigt wird, und überprüfe anschließend die aktualisierte Formulierung anhand des Beispiels und eines Ziels vor ES2017.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript, vscode
- Bereich
- compilers
- Issue-Typ
- Bug
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 35/100