microsoft / microsoft/TypeScript
capitalization of es2017 in error message does not match capitalization of ES2017 autocomplete suggestion
Nobody has claimed this yet.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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