Skip to content

Commit 8e2b7d0

Browse files
Merge pull request #2473 from Microsoft/getSemanticDiagnosticsDeclarations
Fix issue where getSemanticDiagnostics was returning undefined on a .d.ts file.
2 parents 755d806 + 7388120 commit 8e2b7d0

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

src/services/services.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2389,7 +2389,7 @@ module ts {
23892389

23902390
// If '-d' is enabled, check for emitter error. One example of emitter error is export class implements non-export interface
23912391
let declarationDiagnostics = program.getDeclarationDiagnostics(targetSourceFile);
2392-
return semanticDiagnostics.concat(declarationDiagnostics);
2392+
return concatenate(semanticDiagnostics, declarationDiagnostics);
23932393
}
23942394

23952395
function getCompilerOptionsDiagnostics() {
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
/// <reference path="fourslash.ts" />
2+
3+
// @declaration: true
4+
// @Filename: File.d.ts
5+
//// declare var v: string;
6+
7+
verify.numberOfErrorsInCurrentFile(0);
8+
9+

0 commit comments

Comments
 (0)