microsoft / microsoft/TypeScript

Compiler "target" option capitalization in docs inconsistent with code and json schema

オープン
#6,490 コメント 3 件 リアクション 0 件 担当者 0 名 GitHub で見る

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

Docs
主要言語
Go
スター
111k
フォーク
14.4k
平均マージ
1日 19時間
マージ済み PR(30日)
117

説明

https://github.com/Microsoft/TypeScript/wiki/Compiler-Options
says --target can take the value ES5 (uppercase).

Visual Studio Code warns about using the uppercase one in your tsconfig.json, presumably because it's following the schema.

The JSON schema for tsconfig.json also has it in lowercase, but the docs (https://github.com/Microsoft/TypeScript/wiki/tsconfig.json#details) refer you to the first page (which uses uppercase) for the values.


My guess at fixing the problem:

From the source it appears the value ought to be lowercase:
https://github.com/Microsoft/TypeScript/blob/master/src/compiler/commandLineParser.ts#L221

I think the fix is to use lowercase in the docs (the first page).

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

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

はじめの一歩

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

調査の方向性

Compiler Options wiki ページを開き、その --target の値を tsconfig.json のドキュメント、JSON schema、および参照されている src/compiler/commandLineParser.ts のエントリと比較します。大文字と小文字の表記が schema とコードに一致するようにドキュメントを更新し、その後、リンク先のドキュメントに矛盾する案内が残っていないことを確認します。

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

評価

技術スタック
typescript
領域
documentation
issue の種類
ドキュメント
難易度
1/5
見積もり時間
1時間未満
活発さ
停滞
明瞭さ
明確に書かれている
初心者へのやさしさ
45/100

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

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