Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translate 3 tsconfig files to ja #978

Merged
merged 14 commits into from
Oct 21, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
display: "Watch Options"
---

TypeScript 3.8 にてディレクトリを監視するための新戦略をリリースしました。これは、`node_modules` の変更を効率的に検知するために極めて重要なものです。

Linux のような OS において、TypeScript は 依存関係の変更を検出するために、`node_modules` と多くのサブディレクトリに、(ファイルウォッチャーではなく)ディレクトリウォッチャーをインストールします。
なぜなら、利用できるファイルウォッチャーの数を、`node_modules` のファイル数がしばしば上回る一方で、追跡するディレクトリ数は少なく済むからです。

各プロジェクトは異なる戦略の下でより良く動作する可能性もあり、逆にこの新しいアプローチが一連の作業の流れでうまく動作しない可能性もあります。そのため、TypeScript 3.8 では新しく `watchOptions` フィールドが導入されました。このフィールドでは、ファイルやディレクトリを追跡する為に、どの監視戦略を使用すべきか、compiler/language serviceに伝えることができます。
6 changes: 6 additions & 0 deletions packages/tsconfig-reference/copy/ja/intro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
## TSConfig リファレンス紹介

ディレクトリ内の TSConfig ファイルは、TypeScript や JavaScript のプロジェクトルートであることを示します。
TSConfig ファイルは、`tsconfig.json` や `jsconfig.json` のいずれかが利用可能です。どちらを選んでも同じ挙動、同じ設定変数をセットできます。

このページは TSConfig ファイルで利用できるフラグを余す所なくカバーしています。このページは、フラグ毎の概要から始まり、JSON ファイルのルート属性、オプションの大部分を占める `compilerOptions` を説明し、最後は `watchOptions` で締めくくられます。
11 changes: 11 additions & 0 deletions packages/tsconfig-reference/copy/ja/options/fallbackPolling.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
display: "fallbackPolling"
oneline: "What the watcher should use if the system runs out of native file watchers"
---

ファイルシステムのイベントを使用するときに、システムがネイティブのファイルウォッチャーを使い切ったり、ネイティブのファイルウォッチャーが対応していない場合、どのようなポーリング戦略を行使するかを指定するオプションです。

- `fixedPollingInterval`: 一定の間隔を開けて、1 秒間に数回、全ファイルをチェックします。
- `priorityPollingInterval`: 1 秒間に数回、全ファイルをチェックします。しかし、特定の種類のファイルには発見的手法を使用して、他ファイルよりも低頻度でチェックします。
- `dynamicPriorityPolling`: 変更頻度の少ないファイルは、他よりも低頻度でチェックされるように動的キューを使用します。
- `synchronousWatchDirectory`: ディレクトリの遅延監視を無効にします。遅延監視機能は、沢山のファイル変更が一度に引き起こされる場合は役立ちますが(例: `npm install` による `node_modules` の変更)、あまり一般的な構成ではないときに、この遅延監視フラグを無効にしたくなるかもしれません。