1 | import inquirer = require('../..');
|
2 |
|
3 | /**
|
4 | * Represents a choice for several question-types.
|
5 | *
|
6 | * @template T
|
7 | * The type of the answers.
|
8 | */
|
9 | declare class Choice<T extends inquirer.Answers = inquirer.Answers> implements
|
10 | inquirer.ListChoiceOptions<T>,
|
11 | inquirer.CheckboxChoiceOptions<T>,
|
12 | inquirer.ExpandChoiceOptions<T> {
|
13 | /**
|
14 | * @inheritdoc
|
15 | */
|
16 | type?: "choice";
|
17 |
|
18 | /**
|
19 | * @inheritdoc
|
20 | */
|
21 | name: string;
|
22 |
|
23 | /**
|
24 | * @inheritdoc
|
25 | */
|
26 | short: string;
|
27 |
|
28 | /**
|
29 | * @inheritdoc
|
30 | */
|
31 | value: any;
|
32 |
|
33 | /**
|
34 | * @inheritdoc
|
35 | */
|
36 | checked?: boolean;
|
37 |
|
38 | /**
|
39 | * @inheritdoc
|
40 | */
|
41 | disabled: boolean;
|
42 |
|
43 | /**
|
44 | * The key to press for selecting the choice.
|
45 | *
|
46 | * @inheritdoc
|
47 | */
|
48 | key?: string;
|
49 |
|
50 | /**
|
51 | * @inheritdoc
|
52 | */
|
53 | extra?: any;
|
54 |
|
55 | /**
|
56 | * Initializes a new instance of the `Choice` class.
|
57 | *
|
58 | * @param value
|
59 | * The value of the choice.
|
60 | *
|
61 | * @param answers
|
62 | * An object which contains the answers to the questions.
|
63 | */
|
64 | constructor(value: any, answers: T);
|
65 | }
|
66 |
|
67 | export = Choice;
|