microsoft / microsoft/TypeScript

capitalization of es2017 in error message does not match capitalization of ES2017 autocomplete suggestion

Aperta
#43,000 4 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Experience Enhancement Suggestion
Lingua principale
Go
Stelle
111k
Fork
14.3k
Merge medio
1g 19h
PR unite (30g)
117

Descrizione

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.

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Direzione di ricerca

Inizia cercando nei diagnostic del compilatore TypeScript l'errore Object.values segnalato e riproducilo con il codice del Playground collegato, impostato come target ES5. Conferma che il diagnostic utilizzi la stessa capitalizzazione ES2017 mostrata dal completamento di VSCode, quindi verifica la formulazione aggiornata con l'esempio e con un target precedente a ES2017.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
typescript, vscode
Ambito
compilers
Tipo di issue
Bug
Difficoltà
2/5
Tempo stimato
1-3 ore
Stato di attività
Ferma
Chiarezza
Specificata chiaramente
Idoneità per principianti
35/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.