Skip to content

PromptCheckboxQuestion

@tsed/cli-prompts

Usage

typescript
import { PromptCheckboxQuestion } from "@tsed/cli-prompts";

See /packages/cli-prompts/src/interfaces/PromptQuestion.ts.

Overview

ts
interface PromptCheckboxQuestion<Value = any> extends PromptBaseQuestion<Value[]>, Omit<MultiSelectOptions<Value>, "message" | "options"> {
    type: "checkbox";
    choices: string[] | PromptChoice<Value>[];
}

Description

Multi-select prompt where the result is an array of chosen values.

type

ts
type: "checkbox";

choices

ts
choices: string[] | PromptChoice<Value>[];

Available choices displayed to the user.

Released under the MIT License.