Skip to content

[F] createSuppressCodeFixes

function createSuppressCodeFixes(diagnostics, suppressionMessage?): readonly CodeFix[];

Create code fixes to suppress the given diagnostics. This function groups diagnostics by their suppression target to avoid duplicate suppressions. Only warnings with a target are considered. Targets must satisfy the source-location preconditions of createSuppressCodeFix.

ParameterTypeDefault valueDescription
diagnosticsreadonly Diagnostic[]undefinedThe diagnostics to suppress.
suppressionMessagestring""The suppression message to use.

readonly CodeFix[]

An array of code fixes to apply the suppressions.