@inquirer/testing
Version:
Inquirer testing utilities
23 lines (22 loc) • 794 B
TypeScript
import MuteStream from 'mute-stream';
import type { Prompt, Context } from '@inquirer/type';
export declare function render<const Props, const Value>(prompt: Prompt<Value, Props>, props: Props, options?: Context): Promise<{
answer: Promise<Value> & {
/** @deprecated pass an AbortSignal in the context options instead. See {@link https://github.com/SBoudrias/Inquirer.js#canceling-prompt} */
cancel: () => void;
};
input: MuteStream;
events: {
keypress: (key: string | {
name?: string;
ctrl?: boolean;
meta?: boolean;
shift?: boolean;
}) => void;
type: (text: string) => void;
};
getScreen: ({ raw }?: {
raw?: boolean;
}) => string;
getFullOutput: () => string;
}>;