We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e093a8 commit b2f008eCopy full SHA for b2f008e
javascript/extractor/lib/typescript/src/main.ts
@@ -422,8 +422,10 @@ function handleOpenProjectCommand(command: OpenProjectCommand) {
422
let program = project.program;
423
let typeChecker = program.getTypeChecker();
424
425
- let diagnostics = program.getSemanticDiagnostics()
426
- .filter(d => d.category === ts.DiagnosticCategory.Error);
+ let shouldReportDiagnostics = getEnvironmentVariable("SEMMLE_TYPESCRIPT_REPORT_DIAGNOSTICS", Boolean, false);
+ let diagnostics = shouldReportDiagnostics
427
+ ? program.getSemanticDiagnostics().filter(d => d.category === ts.DiagnosticCategory.Error)
428
+ : [];
429
if (diagnostics.length > 0) {
430
console.warn('TypeScript: reported ' + diagnostics.length + ' semantic errors.');
431
}
0 commit comments