faj-cli
Version:
FAJ - A powerful CLI resume builder with AI enhancement and multi-format export
58 lines • 1.8 kB
TypeScript
export declare class EscapeHandler {
private static isEscapeEnabled;
private static escapeCallbacks;
/**
* Enable or disable ESC key handling globally
*/
static setEnabled(enabled: boolean): void;
/**
* Register a callback for ESC key in a specific context
*/
static registerContext(context: string, callback: () => void): void;
/**
* Clear a context callback
*/
static clearContext(context: string): void;
/**
* Wrap an inquirer prompt to handle ESC key
*/
static prompt<T = any>(questions: any, options?: {
context?: string;
onEscape?: () => void;
returnValue?: T;
}): Promise<T>;
/**
* Create a wrapped list prompt with ESC support
*/
static list(message: string, choices: any[], options?: {
backValue?: string;
context?: string;
default?: any;
pageSize?: number;
}): Promise<string>;
/**
* Create a wrapped input prompt with ESC support
*/
static input(message: string, options?: {
default?: string;
validate?: (input: string) => boolean | string;
context?: string;
escapeValue?: string;
}): Promise<string | null>;
/**
* Create a wrapped confirm prompt with ESC support
*/
static confirm(message: string, options?: {
default?: boolean;
context?: string;
}): Promise<boolean>;
/**
* Show ESC navigation hint
*/
static showHint(): void;
}
export declare const escPrompt: typeof EscapeHandler.prompt;
export declare const escList: typeof EscapeHandler.list;
export declare const escInput: typeof EscapeHandler.input;
export declare const escConfirm: typeof EscapeHandler.confirm;
//# sourceMappingURL=EscapeHandler.d.ts.map