mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-12 11:50:54 -06:00
Rename setGetSourceFileAsHashVersioned
This commit is contained in:
parent
f82cb2370f
commit
f8ec54c223
@ -451,7 +451,7 @@ namespace ts {
|
||||
let readFileWithCache = (f: string) => host.readFile(f);
|
||||
let projectCompilerOptions = baseCompilerOptions;
|
||||
const compilerHost = createCompilerHostFromProgramHost(host, () => projectCompilerOptions);
|
||||
setCreateSourceFileAsHashVersioned(compilerHost, host);
|
||||
setGetSourceFileAsHashVersioned(compilerHost, host);
|
||||
|
||||
const buildInfoChecked = createFileMap<true>(toPath);
|
||||
|
||||
|
||||
@ -275,7 +275,7 @@ namespace ts {
|
||||
}
|
||||
}
|
||||
|
||||
export function setCreateSourceFileAsHashVersioned(compilerHost: CompilerHost, host: ProgramHost<any>) {
|
||||
export function setGetSourceFileAsHashVersioned(compilerHost: CompilerHost, host: ProgramHost<any>) {
|
||||
const originalGetSourceFile = compilerHost.getSourceFile;
|
||||
const computeHash = host.createHash || generateDjb2Hash;
|
||||
compilerHost.getSourceFile = (...args) => {
|
||||
@ -619,7 +619,7 @@ namespace ts {
|
||||
}
|
||||
|
||||
const compilerHost = createCompilerHostFromProgramHost(host, () => compilerOptions, directoryStructureHost) as CompilerHost & ResolutionCacheHost;
|
||||
setCreateSourceFileAsHashVersioned(compilerHost, host);
|
||||
setGetSourceFileAsHashVersioned(compilerHost, host);
|
||||
// Members for CompilerHost
|
||||
const getNewSourceFile = compilerHost.getSourceFile;
|
||||
compilerHost.getSourceFile = (fileName, ...args) => getVersionedSourceFileByPath(fileName, toPath(fileName), ...args);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user