Options
All
  • Public
  • Public/Protected
  • All
Menu

Class InputHelper

Hierarchy

  • InputHelper

Index

Properties

Protected _config

_config: Config

config

Accessors

types

  • get types(): QuestionType[]
  • Returns QuestionType[]

Methods

ask

  • ask(message: MessageType, def?: string): Promise<string>
  • Parameters

    • message: MessageType
    • Optional def: string

    Returns Promise<string>

autocomplete

  • autocomplete(message: MessageType, source: string[] | SourceType, suggestOnly?: boolean, validate?: function): Promise<string>
  • Parameters

    • message: MessageType
    • source: string[] | SourceType
    • Default value suggestOnly: boolean = false
    • Optional validate: function
        • (answer: any): boolean
        • Parameters

          • answer: any

          Returns boolean

    Returns Promise<string>

checkbox

  • checkbox(msg: MessageType, choices: ChoiceType[] | Array<ChoiceOption>, validate?: function): Promise<string>
  • Parameters

    • msg: MessageType
    • choices: ChoiceType[] | Array<ChoiceOption>
    • Optional validate: function
        • (answer: any): boolean
        • Parameters

          • answer: any

          Returns boolean

    Returns Promise<string>

confirm

  • confirm(message: MessageType, def?: string): Promise<boolean>
  • Parameters

    • message: MessageType
    • Optional def: string

    Returns Promise<boolean>

datetime

  • datetime(message: MessageType, date?: DateType, time?: TimeType, format?: string[]): Promise<string>

expand

  • expand(msg: MessageType, choices: ChoiceType[] | Array<ChoiceOption>, validate?: function): Promise<string>
  • Parameters

    • msg: MessageType
    • choices: ChoiceType[] | Array<ChoiceOption>
    • Optional validate: function
        • (answer: any): boolean
        • Parameters

          • answer: any

          Returns boolean

    Returns Promise<string>

interact

  • interact(message: string, type?: string, opts?: Question, def?: string): Promise<string>
  • Parameters

    • message: string
    • Default value type: string = "input"
    • Default value opts: Question = {}
    • Optional def: string

    Returns Promise<string>

list

  • list(msg: MessageType, choices: ChoiceType[] | Array<ChoiceOption>, validate?: function): Promise<string>
  • Parameters

    • msg: MessageType
    • choices: ChoiceType[] | Array<ChoiceOption>
    • Optional validate: function
        • (answer: any): boolean
        • Parameters

          • answer: any

          Returns boolean

    Returns Promise<string>

multiple

  • multiple(message: MessageType, type: QuestionType, choices: ChoiceType[] | Array<ChoiceOption>, validate?: function): Promise<string>
  • Parameters

    • message: MessageType
    • type: QuestionType
    • choices: ChoiceType[] | Array<ChoiceOption>
    • Optional validate: function
        • (answer: any): boolean
        • Parameters

          • answer: any

          Returns boolean

    Returns Promise<string>

onExecuteCommandParse

password

  • password(message: MessageType, def?: string, validate?: function): Promise<string>
  • Parameters

    • message: MessageType
    • Optional def: string
    • Optional validate: function
        • (answer: any): boolean
        • Parameters

          • answer: any

          Returns boolean

    Returns Promise<string>

prompt

  • prompt<T>(question: Question): Promise<T>
  • Type parameters

    • T: any

    Parameters

    • question: Question

    Returns Promise<T>

prompts

  • prompts(questions: inquirer.Questions): Promise<Answers>
  • Parameters

    • questions: inquirer.Questions

    Returns Promise<Answers>

rawlist

  • rawlist(msg: MessageType, choices: ChoiceType[] | Array<ChoiceOption>, validate?: function): Promise<string>
  • Parameters

    • msg: MessageType
    • choices: ChoiceType[] | Array<ChoiceOption>
    • Optional validate: function
        • (answer: any): boolean
        • Parameters

          • answer: any

          Returns boolean

    Returns Promise<string>

Generated using TypeDoc