Module

x/cliffy/packages/prompt/lib/generic-prompt.ts>GenericPrompt

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class GenericPrompt
Abstract
import { GenericPrompt } from "https://dotland.deno.dev/x/cliffy@v0.6.1/packages/prompt/lib/generic-prompt.ts";

Constructors

new
protected
GenericPrompt(settings: S)

Properties

protected
isRunning: boolean
protected
lastError: string | undefined
protected
screen
protected
value: T | undefined

Methods

protected
clear()
protected
error(...args: any[])
protected
execute(): Promise<T | undefined>
protected
abstract
format(value: T): string
protected
getMessage(): string | Promise<string>
protected
abstract
getValue(): V
protected
abstract
handleEvent(event: KeyEvent): Promise<boolean>
protected
hint(...args: any[])
protected
message(...args: any[])
protected
preBufferEmptyLines(message: string)
protected
read(): Promise<boolean>
protected
abstract
setPrompt(message: string): void | Promise<void>
protected
abstract
transform(value: V): T | undefined
protected
transformValue(value: V): T | undefined
protected
abstract
validate(value: V): ValidateResult
protected
validateValue(value: V): Promise<boolean>
protected
write(...args: any[])
protected
writeLine(...args: any[])
prompt(): Promise<T | undefined>

Static Properties

protected
injectedValue: any | undefined

Static Methods

inject(value: any): void