Skip to content

Commit 46fa477

Browse files
Move assertion to realpath evaluation
1 parent 1fc6675 commit 46fa477

2 files changed

Lines changed: 1 addition & 1 deletion

File tree

src/compiler/checker.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25004,7 +25004,6 @@ namespace ts {
2500425004
return;
2500525005
}
2500625006
const file = host.getSourceFile(resolvedDirective.resolvedFileName);
25007-
Debug.assert(!!file, `Resolved filename ${resolvedDirective.resolvedFileName} did not map to existing source file. Consider enabling --preserveSymlinks if appropriate`); // tslint:disable-line
2500825007
fileToDirective.set(file.path, key);
2500925008
});
2501025009
}

src/compiler/moduleNameResolver.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -782,6 +782,7 @@ namespace ts {
782782
if (traceEnabled) {
783783
trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real);
784784
}
785+
Debug.assert(host.fileExists(real), `${path} linked to non-existing file ${real}`); // tslint:disable-line
785786
return real;
786787
}
787788

0 commit comments

Comments
 (0)