Skip to content

Commit 0942069

Browse files
Zhengbo LiZhengbo Li
Zhengbo Li
authored and
Zhengbo Li
committed
apply the option to all files and check out options
1 parent 50e941b commit 0942069

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1537,8 +1537,7 @@ namespace ts {
15371537
const emitFilePath = toPath(emitFileName, currentDirectory, getCanonicalFileName);
15381538
// Report error if the output overwrites input file
15391539
if (filesByName.contains(emitFilePath)) {
1540-
const sourceFile = filesByName.get(emitFilePath);
1541-
if (options.noEmitOverwriteForJsFiles && isSourceFileJavaScript(sourceFile)) {
1540+
if (options.noEmitOverwritenFiles && !options.out && !options.outDir && !options.outFile) {
15421541
blockEmittingOfFile(emitFileName);
15431542
}
15441543
else {

src/compiler/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2984,7 +2984,7 @@ namespace ts {
29842984
moduleResolution?: ModuleResolutionKind;
29852985
newLine?: NewLineKind;
29862986
noEmit?: boolean;
2987-
/*@internal*/noEmitOverwriteForJsFiles?: boolean;
2987+
/*@internal*/noEmitOverwritenFiles?: boolean;
29882988
noEmitHelpers?: boolean;
29892989
noEmitOnError?: boolean;
29902990
noErrorTruncation?: boolean;

0 commit comments

Comments
 (0)