Skip to content

Commit

Permalink
Fix #10755: remove uses of package as an identifier name
Browse files Browse the repository at this point in the history
  • Loading branch information
mhegazy committed Sep 7, 2016
1 parent 5c72a32 commit 9ee897a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/services/services.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4048,8 +4048,8 @@ namespace ts {

if (host.getDirectories) {
// Also get all @types typings installed in visible node_modules directories
for (const package of findPackageJsons(scriptPath)) {
const typesDir = combinePaths(getDirectoryPath(package), "node_modules/@types");
for (const packageJson of findPackageJsons(scriptPath)) {
const typesDir = combinePaths(getDirectoryPath(packageJson), "node_modules/@types");
getCompletionEntriesFromDirectories(host, options, typesDir, span, result);
}
}
Expand Down Expand Up @@ -4095,8 +4095,8 @@ namespace ts {

if (host.readFile && host.fileExists) {
for (const packageJson of findPackageJsons(scriptPath)) {
const package = tryReadingPackageJson(packageJson);
if (!package) {
const contents = tryReadingPackageJson(packageJson);
if (!contents) {
return;
}

Expand All @@ -4105,7 +4105,7 @@ namespace ts {

// Provide completions for all non @types dependencies
for (const key of nodeModulesDependencyKeys) {
addPotentialPackageNames(package[key], foundModuleNames);
addPotentialPackageNames(contents[key], foundModuleNames);
}

for (const moduleName of foundModuleNames) {
Expand Down

0 comments on commit 9ee897a

Please sign in to comment.