microsoft / microsoft/TypeScript

Documentation: Clarify declaration files and the declare keyword

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

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

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

説明

TypeScript Version: 2.8.0

Search Terms:
document declaration files

** Issue**
It doesn't look like you actually define what a declaration file is in your documentation. For instance, your introduction to these at https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html tells me you're going to help me learn how to write them, but not what they are or why I'd want one. But, I don't think this makes it easy for a newbie to understand.

Similarly, you don't seem to explain when the declare keyword is, or when it should be used (as far as I can tell, it is used when you need to tell the compiler that the module/library/whatever has a value of some type).

You also seem to make some references to the global namespace (declare global { ... })), but don't seem to directly explain it anywhere.

Code
n/a

Expected behavior:
n/a

Actual behavior:
n/a

Playground Link:
n/a

Related Issues:
n/a

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

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

はじめの一歩

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

調査の方向性

https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html の declaration-files introduction から始め、declare global と関連する declaration-file のガイダンスへの参照をたどってください。編集する前に、周辺の handbook の内容を確認してください。ドキュメントで declaration files が明確に定義され、declare をなぜ、いつ使うのかが説明され、グローバル名前空間について直接説明されていれば完了です。

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

評価

技術スタック
typescript
領域
documentation
issue の種類
ドキュメント
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

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

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