import type { Span } from '../core/index.js'; /** * What a completion is, which decides the icon a host puts beside it. * * `value` is a library name read without brackets, `close` and `aqua` among * them; `function` is one that is called. The two are the manifest's own * `callable`, not a guess from the spelling. */ export type CompletionKind = 'function' | 'value' | 'namespace' | 'member' | 'variable' | 'argument'; export interface Completion { /** What the row reads as: the name, or the parameter for a named argument. */ readonly label: string; /** * What a host puts into the text, which is not always the label. * * A named argument is written `len = `, so accepting the row leaves the caret * where the value goes rather than beside a label with no equals sign. */ readonly insert: string; readonly kind: CompletionKind; /** The signature or the type, spelled by the manifest and the checker. */ readonly detail: string; /** The line the specification gives it, where it gives one. */ readonly summary: string | 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 row and no other. */ readonly refusal: string | undefined; /** The text the row replaces, which is the word being typed or nothing. */ readonly replace: Span; } /** * Everything that may be written at an offset, most useful first. * * Rows are filtered by the word already typed, which is compared exactly: * `language.md` makes names case sensitive, so `EM` is not a start of `ema` and * offering it would be offering a name that does not compile. */ export declare function complete(source: string, offset: number): readonly Completion[]; //# sourceMappingURL=complete.d.ts.map