Options
All
  • Public
  • Public/Protected
  • All
Menu

Type parameters

  • T = object

Hierarchy

  • EventEmitter
    • Enquirer

Index

Constructors

Methods

Constructors

  • new Enquirer<T>(options?: object, answers?: T): Enquirer<T>
  • Type parameters

    • T = object

    Parameters

    • Optional options: object
    • Optional answers: T

    Returns Enquirer<T>

Methods

  • Prompt function that takes a "question" object or array of question objects, and returns an object with responses from the user.

    Parameters

    Returns Promise<T>

  • Register a custom prompt type.

    Parameters

    • type: string
    • fn: typeof BasePrompt | (() => typeof BasePrompt)

      Prompt class, or a function that returns a Prompt class.

    Returns Enquirer<T>

  • Register a custom prompt type.

    Parameters

    Returns Enquirer<T>

  • Use an enquirer plugin.

    Parameters

    Returns Enquirer<T>