Skip to content

[F] createSuppressCodeFix

function createSuppressCodeFix(
diagnosticTarget,
warningCode,
suppressionMessage?
): CodeFix;

Create a fix that inserts a #suppress directive before the nearest supported suppression target. The fix produces no edits if the diagnostic target has no suitable source location.

ParameterTypeDefault value
diagnosticTargetDiagnosticTargetundefined
warningCodestringundefined
suppressionMessagestring""

CodeFix