Skip to content

Commit

Permalink
Merge pull request #10757 from Microsoft/Fix10755
Browse files Browse the repository at this point in the history
Fix #10755: remove uses of `package` as an identifier name
  • Loading branch information
mhegazy authored Sep 7, 2016
2 parents 5c72a32 + 9ee897a commit c16ae3e
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 c16ae3e

Please sign in to comment.