Skip to content

Commit e090043

Browse files
committed
address PR feedback: add comments
1 parent 8e77f40 commit e090043

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/compiler/program.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1031,6 +1031,7 @@ namespace ts {
10311031

10321032
function getDeclarationDiagnostics(sourceFile: SourceFile, cancellationToken: CancellationToken): Diagnostic[] {
10331033
const options = program.getCompilerOptions();
1034+
// collect diagnostics from the program only once if either no source file was specified or out/outFile is set (bundled emit)
10341035
if (!sourceFile || options.out || options.outFile) {
10351036
return getDeclarationDiagnosticsWorker(sourceFile, cancellationToken);
10361037
}

0 commit comments

Comments
 (0)