Merge pull request #34495 from microsoft/forceDts

Add forceDtsEmit flag to getEmitOutput
This commit is contained in:
Sheetal Nandi
2019-10-16 08:14:47 -07:00
committed by GitHub
6 changed files with 48 additions and 10 deletions

View File

@@ -393,7 +393,9 @@ namespace ts {
declarationFilePath: string | undefined,
declarationMapPath: string | undefined,
relativeToBuildInfo: (path: string) => string) {
if (!sourceFileOrBundle || !declarationFilePath) {
if (!sourceFileOrBundle) return;
if (!declarationFilePath) {
if (emitOnlyDtsFiles || compilerOptions.emitDeclarationOnly) emitSkipped = true;
return;
}
const sourceFiles = isSourceFile(sourceFileOrBundle) ? [sourceFileOrBundle] : sourceFileOrBundle.sourceFiles;