import { type Completion } from "@codemirror/autocomplete"; import type { EditorView } from "codemirror"; import type ts from "typescript"; import type { RawCompletion } from "../types.js"; import type { AutocompleteOptions } from "./types.js"; export declare function deserializeCompletions(raw: RawCompletion | null, opts: AutocompleteOptions): { from: number; options: Completion[]; } | null; /** * The default for CodeMirror completions is that when you hit Tab or the other trigger, * it will replace the current 'word' (partially-written text) with the label of the completion. * TypeScript provides codeActions that let you import new modules when you accept * a completion. This checks whether we have any codeActions, and if we do, * lets you import them automatically. */ export declare function codeActionToApplyFunction(codeActions: ts.CodeAction[]): (view: EditorView, completion: Completion, from: number, to: number) => void; //# sourceMappingURL=deserializeCompletions.d.ts.map