Skip to content

Commit 4bbdf2a

Browse files
committed
- Removing filesToWatch from getTypingNamesFromNodeModuleFolder.
These modules are already installed and are not expected to change
1 parent 6aad783 commit 4bbdf2a

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/services/jsTyping.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ namespace ts.JsTyping {
8585
getTypingNamesFromJson(bowerJsonPath, filesToWatch);
8686

8787
const nodeModulesPath = combinePaths(searchDir, "node_modules");
88-
getTypingNamesFromNodeModuleFolder(nodeModulesPath, filesToWatch);
88+
getTypingNamesFromNodeModuleFolder(nodeModulesPath);
8989
}
9090
getTypingNamesFromSourceFileNames(fileNames);
9191

@@ -178,7 +178,7 @@ namespace ts.JsTyping {
178178
* Infer typing names from node_module folder
179179
* @param nodeModulesPath is the path to the "node_modules" folder
180180
*/
181-
function getTypingNamesFromNodeModuleFolder(nodeModulesPath: string, filesToWatch: string[]) {
181+
function getTypingNamesFromNodeModuleFolder(nodeModulesPath: string) {
182182
// Todo: add support for ModuleResolutionHost too
183183
if (!host.directoryExists(nodeModulesPath)) {
184184
return;
@@ -192,7 +192,6 @@ namespace ts.JsTyping {
192192
const result = readConfigFile(normalizedFileName, (path: string) => host.readFile(path));
193193
if (!result.config) { continue; }
194194
const packageJson: PackageJson = result.config;
195-
filesToWatch.push(normalizedFileName);
196195

197196
// npm 3's package.json contains a "_requiredBy" field
198197
// we should include all the top level module names for npm 2, and only module names whose

0 commit comments

Comments
 (0)