Javascript files will emit declarations too so get declaration diagnostics

This commit is contained in:
Sheetal Nandi 2015-09-10 11:01:33 -07:00
parent d3dfd2afef
commit 1dc3414007

View File

@ -2771,7 +2771,7 @@ namespace ts {
// Therefore only get diagnostics for given file.
let semanticDiagnostics = program.getSemanticDiagnostics(targetSourceFile, cancellationToken);
if (!program.getCompilerOptions().declaration || isJavaScript(fileName)) {
if (!program.getCompilerOptions().declaration) {
return semanticDiagnostics;
}