Skip to content

CheckProjectTypesParams.shouldKeepDiagnostic?

CheckProjectTypesParams › shouldKeepDiagnostic?

Type: (diagnostic: Diagnostic) => boolean

Decides whether a diagnostic should be reported, based on the diagnostic itself rather than its source file. Runs in addition to CheckProjectTypesParams.shouldKeepFile — a diagnostic is reported only when both predicates keep it. Use this to drop diagnostics that are reported in a file we own but are caused by something we do not control (e.g. a cross-module-format interop complaint about a third-party import). When omitted, no diagnostic is dropped on this basis.