You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
1.3 KiB
TypeScript
39 lines
1.3 KiB
TypeScript
3 weeks ago
|
import { Separator, type Theme } from '@inquirer/core';
|
||
|
import type { PartialDeep } from '@inquirer/type';
|
||
|
type SearchTheme = {
|
||
|
icon: {
|
||
|
cursor: string;
|
||
|
};
|
||
|
style: {
|
||
|
disabled: (text: string) => string;
|
||
|
searchTerm: (text: string) => string;
|
||
|
description: (text: string) => string;
|
||
|
};
|
||
|
helpMode: 'always' | 'never' | 'auto';
|
||
|
};
|
||
|
type Choice<Value> = {
|
||
|
value: Value;
|
||
|
name?: string;
|
||
|
description?: string;
|
||
|
short?: string;
|
||
|
disabled?: boolean | string;
|
||
|
type?: never;
|
||
|
};
|
||
|
declare const _default: <Value>(config: {
|
||
|
message: string;
|
||
|
source: (term: string | undefined, opt: {
|
||
|
signal: AbortSignal;
|
||
|
}) => readonly (string | Separator)[] | readonly (Separator | Choice<Value>)[] | Promise<readonly (string | Separator)[]> | Promise<readonly (Separator | Choice<Value>)[]>;
|
||
|
validate?: ((value: Value) => boolean | string | Promise<string | boolean>) | undefined;
|
||
|
pageSize?: number | undefined;
|
||
|
instructions?: {
|
||
|
navigation: string;
|
||
|
pager: string;
|
||
|
} | undefined;
|
||
|
theme?: PartialDeep<Theme<SearchTheme>> | undefined;
|
||
|
}, context?: import("@inquirer/type").Context) => Promise<Value> & {
|
||
|
cancel: () => void;
|
||
|
};
|
||
|
export default _default;
|
||
|
export { Separator } from '@inquirer/core';
|