microsoft / microsoft/TypeScript

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

オープン
#43,000 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

Experience Enhancement Suggestion
主要言語
Go
スター
111k
フォーク
14.3k
平均マージ
2日 4時間
マージ済み PR(30日)
132

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず TypeScript コンパイラの診断から報告された Object.values エラーを検索し、ES5 を対象とするリンク先の Playground コードで再現します。診断が VSCode の補完に表示されるものと同じ ES2017 の大文字・小文字表記を使用していることを確認し、その後、サンプルと ES2017 より前のターゲットに対して更新後の文言を検証します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
typescript, vscode
領域
compilers
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。