Skip to content

Commit

Permalink
add watch option
Browse files Browse the repository at this point in the history
  • Loading branch information
harapeko committed Aug 27, 2020
1 parent c6a752b commit dc0ac63
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -1,10 +1,16 @@
---
display: "Watch Options"
display: "監視オプション"
---

TypeScript 3.8 shipped a new strategy for watching directories, which is crucial for efficiently picking up changes to `node_modules`.
TypeScript 3.8 ディレクトリを監視するための新戦略を打ち出しました。これは、`node_modules` の変更を効率的に拾うために極めて重要なものです。

On operating systems like Linux, TypeScript installs directory watchers (as opposed to file watchers) on `node_modules` and many of its subdirectories to detect changes in dependencies.
Linux のような OS において、TypeScript は `node_modules` とそのサブディレクトリの多くに、(ファイルウォッチャーではなく)ディレクトリウォッチャーをインストールします、依存関係の変更を検出するためです。
This is because the number of available file watchers is often eclipsed by the of files in `node_modules`, whereas there are way fewer directories to track.
なぜなら、利用できるファイルウォッチャーの数は、`node_modules` のファイル数に大きく影響を受けます。一方、追跡するディレクトリ数は少なくて済みます。

Because every project might work better under different strategies, and this new approach might not work well for your workflows, TypeScript 3.8 introduces a new `watchOptions` field which allows users to tell the compiler/language service which watching strategies should be used to keep track of files and directories.
全プロジェクトが様々な戦略下でうまく動作するかもしれませんし、この新しいアプローチが一連の作業でうまく動作しないかもしれません。
なので、TypeScript 3.8 では新しく `watchOptions` フィールドが導入されました。
ファイルやディレクトリを追跡する為に、どの監視戦略を使用すべきか、コンパイラと言語のサービスに伝えることができます。

0 comments on commit dc0ac63

Please sign in to comment.