[I] CodeFix
A suggested source change that is resolved only when a consumer requests the fix.
Properties
Section titled “Properties”| Property | Modifier | Type | Description |
|---|---|---|---|
fix | readonly | (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. |
id | readonly | string | Stable identifier used to select this fix, including by command-line code-fix selection. |
label | readonly | string | Human-readable action label shown to users choosing a fix. |