microsoft / microsoft/TypeScript

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

Open
#43,000 4 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Experience Enhancement Suggestion
Dominant language
Go
Stars
111k
Forks
14.3k
Avg merge
2d 4h
Merged PRs (30d)
132

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by searching the TypeScript compiler diagnostics for the reported Object.values error and reproduce it with the linked Playground code targeting ES5. Confirm that the diagnostic uses the same ES2017 capitalization shown by VSCode completion, then verify the updated wording against the sample and a pre-ES2017 target.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript, vscode
Domain
compilers
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.