UNPKG

sdin

Version:

JavaScript package builder.

24 lines (23 loc) 615 B
export interface SelectOption<T> { value: T; label: string; desc?: string; disabled?: boolean; } export interface SelectProps<T> { key: string; value?: T; preset?: T; title: string; options: SelectOption<T>[]; } export declare function select<T>(props: SelectProps<T>): Promise<T>; export interface InputProps { key: string; value?: string; preset?: string; title: string; output?: (str: string) => string; validate?: (str: string) => boolean; } export declare function input({ key, value, preset, title, output, validate }: InputProps): Promise<string>;