import { GenericPrompt } from "https://deno.land/x/cliffy@v0.17.0/mod.ts";
Generic prompt representation.
Constructors
new
protected
GenericPrompt(settings: S)Methods
protected
optional
body(): string | undefined | Promise<string | undefined>protected
clear(): voidClear prompt output.
protected
defaults(): stringprotected
error(): string | undefinedprotected
handleEvent(event: KeyEvent): Promise<void>Handle user input event.
protected
hint(): string | undefinedprotected
isKey<K extends unknown, N extends keyof K>(): 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
submit(): Promise<void>protected
abstract
validate(value: V): ValidateResultValidate input value.
Static Methods
inject(value: unknown): void
Inject prompt value. Can be used for unit tests or pre selections.