Skip to content

Commit b90c5f2

Browse files
author
Yui T
committed
Address code review
1 parent 06ac9c9 commit b90c5f2

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/compiler/emitter.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3243,15 +3243,14 @@ module ts {
32433243
emitFile(compilerOptions.out);
32443244
}
32453245
} else {
3246-
// targetSourceFile is specified (e.g calling emitter from language service or user language service getSemanticDiagnostic)
3247-
var shouldEmitTargetToOwnFile = shouldEmitToOwnFile(targetSourceFile, compilerOptions);
3248-
if (shouldEmitTargetToOwnFile) {
3249-
// If shouldEmitToOwnFile is true or targetSourceFile is an external module file, then emit targetSourceFile in its own output file
3246+
// targetSourceFile is specified (e.g calling emitter from language service or calling getSemanticDiagnostic from language service)
3247+
if (shouldEmitToOwnFile(targetSourceFile, compilerOptions)) {
3248+
// If shouldEmitToOwnFile return true or targetSourceFile is an external module file, then emit targetSourceFile in its own output file
32503249
var jsFilePath = getOwnEmitOutputFilePath(targetSourceFile, ".js");
32513250
emitFile(jsFilePath, targetSourceFile);
32523251
}
3253-
else if (!shouldEmitTargetToOwnFile && compilerOptions.out) {
3254-
// If shouldEmitToOwnFile is false and --out is specified, then emit all, non-external-module file, into one single output file
3252+
else if (compilerOptions.out) {
3253+
// Otherwise, if --out is specified and targetSourceFile shouldn't be emitted to own file, then emit all, non-external-module file, into one single output file
32553254
emitFile(compilerOptions.out);
32563255
}
32573256
}

0 commit comments

Comments
 (0)