Skip to content

PromptListQuestion

@tsed/cli-prompts

Usage ​

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

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

Overview ​

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

Description ​

Single-select prompt with predefined choices.

type ​

ts
type: "list";

choices ​

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

Available choices displayed to the user.

Released under the MIT License.