Interface RenderAutocompleteOptions<T>

interface RenderAutocompleteOptions<T> {
    abortSignal?: AbortSignal;
    choices: Item<T>[];
    hasMorePages?: boolean;
    infoMessage?: {
        body: TokenItem;
        title: {
            color?: LiteralUnion<(keyof ForegroundColor), string>;
            text: TokenItem<
                | string
                | { command: string }
                | { char: string }
                | { subdued: string }
                | { filePath: string }
                | BoldToken
                | { info: string }
                | { warn: string }
                | { error: string },
            >;
        };
    };
    infoTable?: { [header: string]: Items }
    | InfoTableSection[];
    message: Message;
    renderOptions?: RenderOptions;
    search?: (term: string) => Promise<SearchResults<T>>;
}

Type Parameters

  • T

Hierarchy

  • PartialBy<Omit<AutocompletePromptProps<T>, "onSubmit">, "search">
    • RenderAutocompleteOptions

Properties

abortSignal?: AbortSignal
choices: Item<T>[]
hasMorePages?: boolean
infoMessage?: {
    body: TokenItem;
    title: {
        color?: LiteralUnion<(keyof ForegroundColor), string>;
        text: TokenItem<
            | string
            | { command: string }
            | { char: string }
            | { subdued: string }
            | { filePath: string }
            | BoldToken
            | { info: string }
            | { warn: string }
            | { error: string },
        >;
    };
}
infoTable?: { [header: string]: Items } | InfoTableSection[]
message: Message
renderOptions?: RenderOptions
search?: (term: string) => Promise<SearchResults<T>>