mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
Javascript files will emit declarations too so get declaration diagnostics
This commit is contained in:
parent
d3dfd2afef
commit
1dc3414007
@ -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;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user