Interface CodeActionContext

Contains additional diagnostic information about the context in which a code action is run.

interface CodeActionContext {
    diagnostics: readonly Diagnostic[];
    only?: CodeActionKind;
    triggerKind: CodeActionTriggerKind;
}

Properties

diagnostics: readonly Diagnostic[]

An array of diagnostics.

Requested kind of actions to return.

Actions not of this kind are filtered out before being shown by the lightbulb.

The reason why code actions were requested.