Clarify comments

This commit is contained in:
Yui T 2014-09-18 14:07:48 -07:00
parent 360d332bd4
commit c91c52de39

View File

@ -1667,7 +1667,7 @@ module ts {
var allDiagnostics = checker.getDiagnostics(targetSourceFile);
if (compilerOptions.declaration) {
// If '-d' is enabled, check for emitter error. One example of emitter error is export class implements non-export interface
// Get emitter-diagnostics requires calling TypeChecker.emitFiles so define CompilerHost.writer which does nothing as this is a side effect of emitFiles
// Get emitter-diagnostics requires calling TypeChecker.emitFiles so we have to define CompilerHost.writer which does nothing because emitFiles function has side effects defined by CompilerHost.writer
var savedWriter = writer;
writer = (filename: string, data: string, writeByteOrderMark: boolean) => { };
allDiagnostics = allDiagnostics.concat(checker.emitFiles(targetSourceFile).errors);