Skip to content

Commit b66b752

Browse files
committed
Update based on feedback
1 parent a99c04e commit b66b752

3 files changed

Lines changed: 5 additions & 2 deletions

File tree

src/compiler/core.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2736,7 +2736,7 @@ namespace ts {
27362736
function fileExists(fileName: string): boolean {
27372737
const path = toPath(fileName);
27382738
const result = getCachedFileSystemEntriesForBaseDir(path);
2739-
return (result && hasEntry(result.files, getBaseNameOfFileName(fileName))) ||
2739+
return result && hasEntry(result.files, getBaseNameOfFileName(fileName)) ||
27402740
host.fileExists(fileName);
27412741
}
27422742

src/compiler/sys.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ namespace ts {
3030
mtime?: Date;
3131
}
3232

33+
/**
34+
* Partial interface of the System thats needed to support the caching of directory structure
35+
*/
3336
export interface PartialSystem {
3437
writeFile(path: string, data: string, writeByteOrderMark?: boolean): void;
3538
fileExists(path: string): boolean;

src/harness/unittests/programMissingFiles.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
namespace ts {
44
function verifyMissingFilePaths(missingPaths: ReadonlyArray<Path>, expected: ReadonlyArray<string>) {
55
assert.isDefined(missingPaths);
6-
const map = arrayToMap(expected, k => k, _v => true);
6+
const map = arrayToSet(expected) as Map<boolean>;
77
for (const missing of missingPaths) {
88
const value = map.get(missing);
99
assert.isTrue(value, `${missing} to be ${value === undefined ? "not present" : "present only once"}, in actual: ${missingPaths} expected: ${expected}`);

0 commit comments

Comments
 (0)