import type { Colour, Span } from '../core/index.js'; export type HoverKind = 'library' | 'declared' | 'keyword'; export interface Hover { readonly kind: HoverKind; /** The word the pointer is over, which is what a host underlines. */ readonly span: Span; /** The name as written, dotted where the word is half of a namespaced name. */ readonly name: string; /** * Every signature the name has, in the order the manifest holds them. * * More than one where the language gives the name more than one, which * `stdlib.md` 2.2 allows: a hover has no arguments to choose between them * with, so it shows both rather than picking. */ readonly signatures: readonly string[]; /** The line the specification gives it, where it gives one. */ readonly summary: string | undefined; /** The first bar it can produce a value for, as its own row states it. */ readonly warmup: string | undefined; /** The type the checker gave a declared name. */ readonly type: string | undefined; /** Where a declared name was declared, which is what a host jumps to. */ readonly declaredAt: Span | undefined; /** The channels of a named colour, for a swatch. */ readonly colour: Colour | undefined; /** Named in the library and not implemented in this version: OS2020. */ readonly planned: boolean; /** The catalogue's OS2020 message for this name, on a planned name and no other. */ readonly refusal: string | undefined; } /** * What the word at an offset is, or nothing where the offset is not on a word. * * A pointer over a space, a bracket, a number or a string gets nothing: those * are not names, and a tooltip that appeared over a comma would be in the way * rather than useful. A host that wants a literal's value has it in the text. */ export declare function hover(source: string, offset: number): Hover | undefined; //# sourceMappingURL=hover.d.ts.map