import type { Hover, SignatureHelp } from '../../editor/index.js'; import type { EditorState, EditorTooltip, EditorTooltipView, EditorView } from './contract.js'; /** What a host supplies to draw a tooltip, which is the whole of the markup. */ export interface Renderer { (held: Held): EditorTooltipView; } /** * The lines a hover shows, in the order it shows them. * * Every one of them came from the compiler: the signatures from the library * manifest, the sentence and the warmup from the specification's own tables, the * type from the checker, and the refusal from the error catalogue. Nothing is * written here, which is why this function is a join rather than a template. */ export declare function hoverLines(held: Hover): readonly string[]; /** The lines a signature tooltip shows, with the active parameter named. */ export declare function signatureLines(held: SignatureHelp): readonly string[]; /** * A hover tooltip source, which a host wires in one line. * * ```ts * hoverTooltip(openscriptHoverTooltip(render)) * ``` */ export declare function openscriptHoverTooltip(render: Renderer): (view: EditorView, pos: number) => EditorTooltip | null; /** * A signature tooltip for wherever the cursor is, or nothing where it is in no * call. * * ```ts * showTooltip.compute(["doc", "selection"], openscriptSignatureTooltip(render)) * ``` */ export declare function openscriptSignatureTooltip(render: Renderer): (state: EditorState) => EditorTooltip | null; //# sourceMappingURL=tooltips.d.ts.map