/** * Inquirer.js * A collection of common interactive command line user interfaces. */ import { Separator } from '@inquirer/prompts'; import type { Prettify, UnionToIntersection } from '@inquirer/type'; import { default as PromptsRunner } from './ui/prompt.js'; import type { LegacyPromptConstructor, PromptFn } from './ui/prompt.js'; import type { Answers, Question, QuestionAnswerMap, QuestionObservable, StreamOptions } from './types.js'; export type { QuestionMap } from './types.js'; type PromptReturnType = (Promise> & { ui: PromptsRunner>; }) | never; /** * Create a new self-contained prompt module. */ export declare function createPromptModule(opt?: StreamOptions): { (questions: { [I in keyof AnswerList]: Question; }, answers?: PrefilledAnswers): PromptReturnType>; , const A extends Answers>, PrefilledAnswers extends Answers = object>(questions: Map, answers?: PrefilledAnswers): PromptReturnType; (questions: QuestionObservable, answers?: PrefilledAnswers): PromptReturnType; (questions: Question, answers?: PrefilledAnswers): PromptReturnType; prompts: { [x: string]: LegacyPromptConstructor | PromptFn; }; /** * Register a prompt type */ registerPrompt(name: string, prompt: LegacyPromptConstructor | PromptFn): any; /** * Register the defaults provider prompts */ restoreDefaultPrompts(): void; }; declare function registerPrompt(name: string, newPrompt: LegacyPromptConstructor): void; declare function restoreDefaultPrompts(): void; declare const inquirer: { prompt: { (questions: { [I in keyof AnswerList]: Question; }, answers?: PrefilledAnswers): PromptReturnType>; , const A extends Answers>, PrefilledAnswers extends Answers = object>(questions: Map, answers?: PrefilledAnswers): PromptReturnType; (questions: QuestionObservable, answers?: PrefilledAnswers): PromptReturnType; (questions: Question, answers?: PrefilledAnswers): PromptReturnType; prompts: { [x: string]: LegacyPromptConstructor | PromptFn; }; /** * Register a prompt type */ registerPrompt(name: string, prompt: LegacyPromptConstructor | PromptFn): any; /** * Register the defaults provider prompts */ restoreDefaultPrompts(): void; }; ui: { Prompt: typeof PromptsRunner; }; createPromptModule: typeof createPromptModule; registerPrompt: typeof registerPrompt; restoreDefaultPrompts: typeof restoreDefaultPrompts; Separator: typeof Separator; }; export default inquirer;