CheckProjectTypesParams.shouldKeepDiagnostic method
CheckProjectTypesParams › shouldKeepDiagnostic
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.Signature:
shouldKeepDiagnostic(this: void, diagnostic: Diagnostic): booleanParameters:
| Parameter | Type | Description |
|---|---|---|
| this | void | |
| diagnostic | Diagnostic | The diagnostic to evaluate. |
Returns: boolean — true to report the diagnostic, false to ignore it.