@@ -84,18 +84,56 @@ export interface Option {
8484 */
8585 description : string ;
8686
87+ /**
88+ * The type of option value. If multiple types exist, this type will be the first one, and the
89+ * types array will contain all types accepted.
90+ */
8791 type : OptionType | 'suboption' ;
92+
93+ /**
94+ * {@see type }
95+ */
8896 types ?: OptionType [ ] ;
8997
98+ /**
99+ * Aliases supported by this option.
100+ */
90101 aliases : string [ ] ;
102+
103+ /**
104+ * Whether this option is required or not.
105+ */
91106 required ?: boolean ;
107+
108+ /**
109+ * Format field of this option.
110+ */
92111 format ?: string ;
112+
113+ /**
114+ * Whether this option should be hidden from the help output. It will still show up in JSON help.
115+ */
93116 hidden ?: boolean ;
117+
118+ /**
119+ * Default value of this option.
120+ */
94121 default ?: string | number | boolean ;
122+
123+ /**
124+ * If this option can be used as an argument, the position of the argument. Otherwise omitted.
125+ */
95126 positional ?: number ;
127+
128+ /**
129+ * Smart default object.
130+ */
96131 $default ?: OptionSmartDefault ;
97132}
98133
134+ /**
135+ * Scope of the command.
136+ */
99137export enum CommandScope {
100138 InProject = 'in' ,
101139 OutProject = 'out' ,
@@ -116,7 +154,14 @@ export enum CommandType {
116154 * A description of a command, its metadata.
117155 */
118156export interface CommandDescription {
157+ /**
158+ * Name of the command.
159+ */
119160 name : string ;
161+
162+ /**
163+ * Short description (1-2 lines) of this command.
164+ */
120165 description : string ;
121166
122167 /**
@@ -129,15 +174,40 @@ export interface CommandDescription {
129174 */
130175 usageNotes ?: string ;
131176
177+ /**
178+ * List of all supported options.
179+ */
132180 options : Option [ ] ;
133181
182+ /**
183+ * Aliases supported for this command.
184+ */
134185 aliases : string [ ] ;
186+
187+ /**
188+ * Scope of the command, whether it can be executed in a project, outside of a project or
189+ * anywhere.
190+ */
135191 scope : CommandScope ;
192+
193+ /**
194+ * Type of command.
195+ */
136196 type : CommandType ;
137197
198+ /**
199+ * Whether this command should be hidden from a list of all commands.
200+ */
201+ hidden : boolean ;
202+
203+ /**
204+ * The constructor of the command, which should be extending the abstract Command<> class.
205+ */
138206 impl : CommandConstructor ;
139207
140- hidden : boolean ;
208+ /**
209+ * Suboptions.
210+ */
141211 suboptions ?: {
142212 [ name : string ] : Option [ ] ;
143213 } ;
0 commit comments