Skip to content

Commit

Permalink
Comment
Browse files Browse the repository at this point in the history
  • Loading branch information
sheetalkamat committed Aug 18, 2022
1 parent 97011d6 commit 1e62da1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/compiler/moduleNameResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -395,6 +395,7 @@ namespace ts {
const pathsAreEqual = arePathsEqual(fileName, resolvedFileName, host);
resolvedTypeReferenceDirective = {
primary,
// If the fileName and realpath are differing only in casing prefer fileName so that we can issue correct errors for casing under forceConsistentCasingInFileNames
resolvedFileName: pathsAreEqual ? fileName : resolvedFileName,
originalPath: pathsAreEqual ? undefined : fileName,
packageId,
Expand Down Expand Up @@ -1409,6 +1410,7 @@ namespace ts {
const path = realPath(resolvedValue.path, host, traceEnabled);
const pathsAreEqual = arePathsEqual(path, resolvedValue.path, host);
const originalPath = pathsAreEqual ? undefined : resolvedValue.path;
// If the path and realpath are differing only in casing prefer path so that we can issue correct errors for casing under forceConsistentCasingInFileNames
resolvedValue = { ...resolvedValue, path: pathsAreEqual ? resolvedValue.path : path, originalPath };
}
// For node_modules lookups, get the real path so that multiple accesses to an `npm link`-ed module do not create duplicate files.
Expand Down

0 comments on commit 1e62da1

Please sign in to comment.