mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-15 21:36:50 -05:00
PR feedback
This commit is contained in:
@@ -119,7 +119,6 @@ namespace ts {
|
||||
});
|
||||
const useCaseSensitiveFileNames = sys && sys.useCaseSensitiveFileNames;
|
||||
const getCanonicalFileName = createGetCanonicalFileName(useCaseSensitiveFileNames);
|
||||
const filesByPath = useGetSourceFileByPath ? mapEntries(files, (fileName, file) => [toPath(fileName, "", getCanonicalFileName), file]) : undefined;
|
||||
const trace: string[] = [];
|
||||
const result: TestCompilerHost = {
|
||||
trace: s => trace.push(s),
|
||||
@@ -139,7 +138,8 @@ namespace ts {
|
||||
},
|
||||
};
|
||||
if (useGetSourceFileByPath) {
|
||||
result.getSourceFileByPath = (_fileName, path) => filesByPath!.get(path);
|
||||
const filesByPath = mapEntries(files, (fileName, file) => [toPath(fileName, "", getCanonicalFileName), file]);
|
||||
result.getSourceFileByPath = (_fileName, path) => filesByPath.get(path);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user