Skip to content

[I] CodeFix

A suggested source change that is resolved only when a consumer requests the fix.

PropertyModifierTypeDescription
fixreadonly(fixContext) => | void | Promise<void> | CodeFixEdit | CodeFixEdit[]Computes edits when the fix is resolved, not when its diagnostic is reported. Context helpers only construct edits: return them to have the caller apply them. Returning nothing, including from an asynchronous callback, contributes no edits.
idreadonlystringStable identifier used to select this fix, including by command-line code-fix selection.
labelreadonlystringHuman-readable action label shown to users choosing a fix.