Skip to content

Commit

Permalink
refactor: rename param
Browse files Browse the repository at this point in the history
  • Loading branch information
RebeccaStevens committed Apr 10, 2023
1 parent 278cefe commit 72a70f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions packages/type-utils/src/TypeOrValueSpecifier.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ function typeDeclaredInFile(
}

function typeDeclaredInPackage(
name: string,
packageName: string,
declarationFiles: ts.SourceFile[],
program: ts.Program,
): boolean {
Expand All @@ -156,8 +156,8 @@ function typeDeclaredInPackage(
program,
);
const possibleLocations = [
`${path.join(program.getCurrentDirectory(), 'node_modules', name)}/`,
...(typeRoots?.map(root => `${path.join(root, name)}/`) ?? []),
`${path.join(program.getCurrentDirectory(), 'node_modules', packageName)}/`,
...(typeRoots?.map(root => `${path.join(root, packageName)}/`) ?? []),
];
return declarationFiles.some(declaration =>
possibleLocations.some(location =>
Expand Down

0 comments on commit 72a70f3

Please sign in to comment.