Skip to content

Commit 84b9ebd

Browse files
author
Kanchalai Tanglertsampan
committed
Return empty string instead to prevent exception downstream particularly in writeReferencePath
1 parent 746c45c commit 84b9ebd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/utilities.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2653,7 +2653,7 @@ namespace ts {
26532653
if (sourceFiles.length) {
26542654
const jsFilePath = options.outFile || options.out;
26552655
const sourceMapFilePath = getSourceMapFilePath(jsFilePath, options);
2656-
const declarationFilePath = options.declaration ? removeFileExtension(jsFilePath) + ".d.ts" : undefined;
2656+
const declarationFilePath = options.declaration ? removeFileExtension(jsFilePath) + ".d.ts" : "";
26572657
action({ jsFilePath, sourceMapFilePath, declarationFilePath }, createBundle(sourceFiles), emitOnlyDtsFiles);
26582658
}
26592659
}

0 commit comments

Comments
 (0)