Skip to content

Commit 1e62da1

Browse files
committed
Comment
1 parent 97011d6 commit 1e62da1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/compiler/moduleNameResolver.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ namespace ts {
395395
const pathsAreEqual = arePathsEqual(fileName, resolvedFileName, host);
396396
resolvedTypeReferenceDirective = {
397397
primary,
398+
// If the fileName and realpath are differing only in casing prefer fileName so that we can issue correct errors for casing under forceConsistentCasingInFileNames
398399
resolvedFileName: pathsAreEqual ? fileName : resolvedFileName,
399400
originalPath: pathsAreEqual ? undefined : fileName,
400401
packageId,
@@ -1409,6 +1410,7 @@ namespace ts {
14091410
const path = realPath(resolvedValue.path, host, traceEnabled);
14101411
const pathsAreEqual = arePathsEqual(path, resolvedValue.path, host);
14111412
const originalPath = pathsAreEqual ? undefined : resolvedValue.path;
1413+
// If the path and realpath are differing only in casing prefer path so that we can issue correct errors for casing under forceConsistentCasingInFileNames
14121414
resolvedValue = { ...resolvedValue, path: pathsAreEqual ? resolvedValue.path : path, originalPath };
14131415
}
14141416
// For node_modules lookups, get the real path so that multiple accesses to an `npm link`-ed module do not create duplicate files.

0 commit comments

Comments
 (0)