UNPKG

pastoralist

Version:

A tool to watch over node module resolutions and overrides

18 lines (17 loc) 984 B
import * as readline from "readline"; import type { PromptChoice, PromptOptions } from "./types"; export declare class Prompt { protected rl: readline.Interface; constructor(); close(): void; private ensureCookedMode; input(message: string, defaultValue?: string): Promise<string>; confirm(message: string, defaultValue?: boolean): Promise<boolean>; list(message: string, choices: PromptChoice[]): Promise<string>; prompt(options: PromptOptions): Promise<string | boolean>; promptMany(questions: PromptOptions[]): Promise<Record<string, string | boolean>>; } export declare function createPrompt<T = unknown>(callback: (prompt: Prompt) => Promise<T>): Promise<T>; export declare function quickConfirm(message: string, defaultValue?: boolean): Promise<boolean>; export declare function quickInput(message: string, defaultValue?: string): Promise<string>; export declare function quickList(message: string, choices: PromptChoice[]): Promise<string>;