We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 85d71b2 commit 791a0e4Copy full SHA for 791a0e4
src/compiler/program.ts
@@ -254,7 +254,9 @@ module ts {
254
function getDeclarationDiagnosticsForFile(sourceFile: SourceFile): Diagnostic[] {
255
if (!isDeclarationFile(sourceFile)) {
256
let resolver = getDiagnosticsProducingTypeChecker().getEmitResolver(sourceFile);
257
- return ts.getDeclarationDiagnostics(getEmitHost(), resolver, sourceFile);
+ // Don't actually write any files since we're just getting diagnostics.
258
+ var writeFile: WriteFileCallback = () => { };
259
+ return ts.getDeclarationDiagnostics(getEmitHost(writeFile), resolver, sourceFile);
260
}
261
262
0 commit comments