mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
RWC:Handle lib entries in tsconfig
This commit is contained in:
parent
62eeb7254c
commit
ad18bde92b
@ -2146,8 +2146,8 @@ namespace Harness {
|
||||
return filePath.indexOf(Harness.libFolder) === 0;
|
||||
}
|
||||
|
||||
export function getDefaultLibraryFile(io: Harness.Io): Harness.Compiler.TestFile {
|
||||
const libFile = Harness.userSpecifiedRoot + Harness.libFolder + Harness.Compiler.defaultLibFileName;
|
||||
export function getDefaultLibraryFile(libPath: string, io: Harness.Io): Harness.Compiler.TestFile {
|
||||
const libFile = Harness.userSpecifiedRoot + Harness.libFolder + libPath.slice(io.directoryName(libPath).length + 1);
|
||||
return { unitName: libFile, content: io.readFile(libFile) };
|
||||
}
|
||||
|
||||
|
||||
@ -131,7 +131,7 @@ namespace RWC {
|
||||
}
|
||||
else {
|
||||
// set the flag to put default library to the beginning of the list
|
||||
inputFiles.unshift(Harness.getDefaultLibraryFile(oldIO));
|
||||
inputFiles.unshift(Harness.getDefaultLibraryFile(fileRead.path, oldIO));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user