import { StdioOption } from 'exec'; declare class RadashiError extends Error { constructor(message: string); } declare class EarlyExitError extends RadashiError { constructor(message?: string); } type LogHandler = (type: 'info' | 'warn' | 'error', msg: string, ...args: any[]) => void; declare function setLogHandler(handler: LogHandler): void; type OpenFileHandler = (file: string) => Promise; declare function setFileOpener(handler: OpenFileHandler): void; type PromptType = 'autocomplete' | 'text' | 'confirm' | 'select'; interface PromptOptions { type: Type; name: string; message: string; choices?: PromptChoice[]; initial?: PromptResult; validate?: (value: PromptResult) => string | true; } interface PromptChoice { title: string; value: Value; description?: string; } type PromptResult = Type extends 'autocomplete' ? Value : Type extends 'text' ? string : Type extends 'confirm' ? boolean : Type extends 'select' ? Value : never; type PromptHandler = (options: PromptOptions) => Promise | undefined>; declare function setPromptHandler(handler: PromptHandler): void; declare function setStdio(arg: StdioOption): void; declare function run(argv: string[]): Promise; export { EarlyExitError, RadashiError, run, setFileOpener, setLogHandler, setPromptHandler, setStdio };