mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-17 21:06:50 -05:00
Javascript files will emit declarations too so get declaration diagnostics
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user