Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/cliffy/packages/prompt/mod.ts>GenericPrompt

Command line framework for deno 🦕 Including Commandline-Interfaces, Prompts, CLI-Table, Arguments Parser and more...
Extremely Popular
Go to Latest
class GenericPrompt
Re-export
Abstract
import { GenericPrompt } from "https://deno.land/x/cliffy@0.12.1/packages/prompt/mod.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>
protected
abstract
format(value: T): string
protected
getMessage(): string | Promise<string>
protected
getSuccessMessage(value: T)
protected
abstract
getValue(): V
protected
abstract
handleEvent(event: KeyEvent): Promise<boolean>
protected
hint(...args: any[])
protected
isKey<K extends any, N extends keyof K>(
keys: K | undefined,
name: N,
event: KeyEvent,
): boolean
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>

Static Properties

protected
injectedValue: any | undefined

Static Methods

inject(value: any): void