Functions

f
split(line: string): Typed | null

Where a completion would go in line, or null where none could.

f
suggest(
line: string,
sources: Sources
): string

The rest of what is being typed, drawn after the cursor — zsh's autosuggestion.

Interfaces

I
Sources

What a suggestion can be drawn from. Both are optional: either alone still answers.

I
Typed

A name and a path: document.qu is qu hanging off document, doc is doc off nothing.

  • base: string

    The expression whose properties could finish the token, or '' for a bare name.

  • token: string

    The partial identifier under the cursor, empty directly after a dot.