Set rootDir in tsconfig-base.json (#26415)

This commit is contained in:
Andy
2018-08-13 15:19:27 -07:00
committed by GitHub
parent e8b72aa7d9
commit cea4838972
2 changed files with 2 additions and 10 deletions

View File

@@ -3188,16 +3188,7 @@ namespace ts {
}
export function getDeclarationEmitOutputFilePath(fileName: string, host: EmitHost) {
// TODO: GH#25810 following should work but makes the build break:
// return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), f => host.getCanonicalFileName(f));
const options = host.getCompilerOptions();
const outputDir = options.declarationDir || options.outDir; // Prefer declaration folder if specified
const path = outputDir
? getSourceFilePathInNewDir(fileName, host, outputDir)
: fileName;
return removeFileExtension(path) + Extension.Dts;
return getDeclarationEmitOutputFilePathWorker(fileName, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), f => host.getCanonicalFileName(f));
}
export function getDeclarationEmitOutputFilePathWorker(fileName: string, options: CompilerOptions, currentDirectory: string, commonSourceDirectory: string, getCanonicalFileName: GetCanonicalFileName): string {

View File

@@ -3,6 +3,7 @@
"pretty": true,
"lib": ["es2015"],
"target": "es5",
"rootDir": ".",
"declaration": true,
"declarationMap": true,