UNPKG

@stacksjs/clapp

Version:

A toolkit for building CLI prompts in TypeScript.

21 lines 581 B
import type { Action } from './utils/settings'; /** * Typed event emitter */ export declare interface PromptEvents { initial: (value?: any) => void active: (value?: any) => void cancel: (value?: any) => void submit: (value?: any) => void error: (value?: any) => void cursor: (key?: Action) => void key: (key?: string) => void value: (value?: string) => void confirm: (value?: boolean) => void finalize: () => void } /** * The state of the prompt */ export type PromptState = 'initial' | 'active' | 'cancel' | 'submit' | 'error' export * from './core/types';