Merge pull request #2473 from Microsoft/getSemanticDiagnosticsDeclarations

Fix issue where getSemanticDiagnostics was returning undefined on a .d.ts file.
This commit is contained in:
CyrusNajmabadi 2015-03-24 11:14:34 -07:00
commit 8e2b7d0568
2 changed files with 10 additions and 1 deletions

View File

@ -2389,7 +2389,7 @@ module ts {
// If '-d' is enabled, check for emitter error. One example of emitter error is export class implements non-export interface
let declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile);
return semanticDiagnostics.concat(declarationDiagnostics);
return concatenate(semanticDiagnostics, declarationDiagnostics);
}
function getCompilerOptionsDiagnostics() {

View File

@ -0,0 +1,9 @@
/// <reference path="fourslash.ts" />
// @declaration: true
// @Filename: File.d.ts
//// declare var v: string;
verify.numberOfErrorsInCurrentFile(0);