export { isCancel } from '@clack/core'; interface TextOptions { message: string; placeholder?: string; defaultValue?: string; initialValue?: string; validate?: (value: string) => string | void; } declare const text: (opts: TextOptions) => Promise; interface PasswordOptions { message: string; mask?: string; validate?: (value: string) => string | void; } declare const password: (opts: PasswordOptions) => Promise; interface ConfirmOptions { message: string; active?: string; inactive?: string; initialValue?: boolean; } declare const confirm: (opts: ConfirmOptions) => Promise; type Primitive = Readonly; type Option = Value extends Primitive ? { value: Value; label?: string; hint?: string; } : { value: Value; label: string; hint?: string; }; interface SelectOptions { message: string; options: Option[]; initialValue?: Value; maxItems?: number; } declare const select: (opts: SelectOptions) => Promise; declare const selectKey: (opts: SelectOptions) => Promise; interface MultiSelectOptions { message: string; options: Option[]; initialValues?: Value[]; maxItems?: number; required?: boolean; cursorAt?: Value; } declare const multiselect: (opts: MultiSelectOptions) => Promise; interface GroupMultiSelectOptions { message: string; options: Record[]>; initialValues?: Value[]; required?: boolean; cursorAt?: Value; } declare const groupMultiselect: (opts: GroupMultiSelectOptions) => Promise; declare const note: (message?: string, title?: string) => void; declare const cancel: (message?: string) => void; declare const intro: (title?: string) => void; declare const outro: (message?: string) => void; type LogMessageOptions = { symbol?: string; }; declare const log: { message: (message?: string, { symbol }?: LogMessageOptions) => void; info: (message: string) => void; success: (message: string) => void; step: (message: string) => void; warn: (message: string) => void; /** alias for `log.warn()`. */ warning: (message: string) => void; error: (message: string) => void; }; declare const spinner: () => { start: (msg?: string) => void; stop: (msg?: string, code?: number) => void; message: (msg?: string) => void; }; type PromptGroupAwaitedReturn = { [P in keyof T]: Exclude, symbol>; }; interface PromptGroupOptions { /** * Control how the group can be canceled * if one of the prompts is canceled. */ onCancel?: (opts: { results: Prettify>>; }) => void; } type Prettify = { [P in keyof T]: T[P]; } & {}; type PromptGroup = { [P in keyof T]: (opts: { results: Prettify>>>; }) => void | Promise; }; /** * Define a group of prompts to be displayed * and return a results of objects within the group */ declare const group: (prompts: PromptGroup, opts?: PromptGroupOptions | undefined) => Promise<{ [P in keyof PromptGroupAwaitedReturn]: PromptGroupAwaitedReturn[P]; }>; type Task = { /** * Task title */ title: string; /** * Task function */ task: (message: (string: string) => void) => string | Promise | void | Promise; /** * If enabled === false the task will be skipped */ enabled?: boolean; }; /** * Define a group of tasks to be executed */ declare const tasks: (tasks: Task[]) => Promise; export { type ConfirmOptions, type GroupMultiSelectOptions, type LogMessageOptions, type MultiSelectOptions, type PasswordOptions, type PromptGroup, type PromptGroupAwaitedReturn, type PromptGroupOptions, type SelectOptions, type Task, type TextOptions, cancel, confirm, group, groupMultiselect, intro, log, multiselect, note, outro, password, select, selectKey, spinner, tasks, text };