Skip to content

completionItemToOption

function completionItemToOption(item): {
detail?: string;
label: string;
type: string;
};

Defined in: packages/engine/src/language/adapters/codemirror.ts:39

Convert a completion into CodeMirror’s option shape.

Kept in an adapter so the language service itself stays editor-agnostic.

ParameterTypeDescription
itemCompletionItemCompletion produced by the language service.
{
detail?: string;
label: string;
type: string;
}

The equivalent CodeMirror option.

optional detail?: string;
label: string;
type: string;