import { GenericPrompt } from "https://deno.land/x/lume@v2.4.1/deps/cliffy.ts";
Generic prompt representation.
Constructors
new
protected
GenericPrompt(settings: TSettings)Methods
protected
optional
body(): string | undefined | Promise<string | undefined>protected
clear(): voidClear prompt output.
protected
defaults(): stringprotected
error(): string | undefinedprotected
handleEvent(event: KeyCode): Promise<void>Handle user input event.
protected
hint(): string | undefinedprotected
isKey<TKey extends unknown, TName extends keyof TKey>(): booleanCheck if key event has given name or sequence.
protected
message(): stringprotected
read(): Promise<boolean>Read user input from stdin, handle events and validate user input.
protected
render(): Promise<void>Render prompt.
protected
setErrorMessage(message: string)protected
submit(): Promise<void>protected
abstract
validate(value: TRawValue): ValidateResultValidate input value.
Static Methods
inject(value: unknown): void
Inject prompt value. Can be used for unit tests or pre selections.