@optique/core 1.0.0-dev.431 → 1.0.0-dev.434

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/facade.d.cts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Message } from "./message.cjs";
2
+ import { HiddenVisibility, OptionName } from "./usage.cjs";
2
3
  import { DocSection, ShowChoicesOptions, ShowDefaultOptions } from "./doc.cjs";
3
4
  import { InferMode, InferValue, Mode, ModeValue, Parser } from "./parser.cjs";
4
5
  import { ShellCompletion } from "./completion.cjs";
@@ -8,101 +9,55 @@ import { Program } from "./program.cjs";
8
9
  //#region src/facade.d.ts
9
10
 
10
11
  /**
11
- * Naming style for shell completion command and option aliases.
12
+ * Sub-configuration for a meta command's command form.
12
13
  *
13
- * @since 0.10.0
14
- */
15
- type CompletionName = "singular" | "plural" | "both";
16
- /**
17
- * Visibility policy for completion entries in help and usage output.
18
- *
19
- * @since 0.10.0
14
+ * @since 1.0.0
20
15
  */
21
- type CompletionHelpVisibility = CompletionName | "none";
22
- type CompletionConfigBase<THelp> = {
16
+ interface CommandSubConfig {
23
17
  /**
24
- * Determines how completion is made available:
25
- *
26
- * - `"command"`: Only the `completion` subcommand is available
27
- * - `"both"`: Both `completion` subcommand and `--completion` option
28
- * are available
29
- *
30
- * @default `"both"`
18
+ * Command names. The first element is the display name shown in help
19
+ * output; additional elements are hidden aliases that are accepted but
20
+ * not shown.
31
21
  */
32
- readonly mode?: "command" | "both";
22
+ readonly names?: readonly [string, ...string[]];
33
23
  /**
34
- * Group label for the completion command in help output. When specified,
35
- * the completion command appears under a titled section with this name
36
- * instead of alongside user-defined commands.
37
- *
38
- * @since 0.10.0
24
+ * Group label for the command in help output. When specified, the command
25
+ * appears under a titled section with this name instead of alongside
26
+ * user-defined commands.
39
27
  */
40
28
  readonly group?: string;
41
29
  /**
42
- * Available shell completions. By default, includes `bash`, `fish`, `nu`,
43
- * `pwsh`, and `zsh`. You can provide additional custom shell completions
44
- * or override the defaults.
30
+ * Granular visibility control.
45
31
  *
46
- * @default `{ bash, fish, nu, pwsh, zsh }`
32
+ * - `true`: Hidden from usage, documentation, and suggestions.
33
+ * - `"usage"`: Hidden from usage lines only.
34
+ * - `"doc"`: Hidden from documentation only.
47
35
  */
48
- readonly shells?: Record<string, ShellCompletion>;
49
- /**
50
- * Callback function invoked when completion is requested. The function
51
- * can optionally receive an exit code parameter.
52
- *
53
- * You usually want to pass `process.exit` on Node.js or Bun and
54
- * `Deno.exit` on Deno to this option.
55
- *
56
- * @default Returns `void` when completion is shown.
57
- */
58
- readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
59
- } | {
36
+ readonly hidden?: HiddenVisibility;
37
+ }
38
+ /**
39
+ * Sub-configuration for a meta command's option form.
40
+ *
41
+ * @since 1.0.0
42
+ */
43
+ interface OptionSubConfig {
60
44
  /**
61
- * Determines how completion is made available:
62
- *
63
- * - `"option"`: Only the `--completion` option is available
45
+ * Option names (all shown in help, e.g., `"-h"`, `"--help"`).
64
46
  */
65
- readonly mode: "option";
66
- /** @since 0.10.0 */
67
- readonly group?: never;
68
- /** @default `{ bash, fish, nu, pwsh, zsh }` */
69
- readonly shells?: Record<string, ShellCompletion>;
70
- /** @default Returns `void` when completion is shown. */
71
- readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
72
- };
73
- type CompletionConfigBoth<THelp> = CompletionConfigBase<THelp> & {
47
+ readonly names?: readonly [OptionName, ...OptionName[]];
74
48
  /**
75
- * Determines whether to use singular or plural naming for completion command/option.
76
- *
77
- * - `"singular"`: Use `completion` / `--completion`
78
- * - `"plural"`: Use `completions` / `--completions`
79
- * - `"both"`: Use both singular and plural forms
80
- *
81
- * @default `"both"`
49
+ * Group label for the option in help output.
82
50
  */
83
- readonly name?: "both";
51
+ readonly group?: string;
84
52
  /**
85
- * Controls which completion entries appear in help and usage output.
86
- *
87
- * - `"both"`: Show both singular and plural entries
88
- * - `"singular"`: Show only singular entries
89
- * - `"plural"`: Show only plural entries
90
- * - `"none"`: Hide completion entries from help and usage
53
+ * Granular visibility control.
91
54
  *
92
- * @default Matches `name`
93
- * @since 0.10.0
55
+ * - `true`: Hidden from usage, documentation, and suggestions.
56
+ * - `"usage"`: Hidden from usage lines only.
57
+ * - `"doc"`: Hidden from documentation only.
94
58
  */
95
- readonly helpVisibility?: CompletionHelpVisibility;
96
- };
97
- type CompletionConfigSingular<THelp> = CompletionConfigBase<THelp> & {
98
- readonly name: "singular";
99
- readonly helpVisibility?: "singular" | "none";
100
- };
101
- type CompletionConfigPlural<THelp> = CompletionConfigBase<THelp> & {
102
- readonly name: "plural";
103
- readonly helpVisibility?: "plural" | "none";
104
- };
105
- type CompletionConfig<THelp> = CompletionConfigBoth<THelp> | CompletionConfigSingular<THelp> | CompletionConfigPlural<THelp>;
59
+ readonly hidden?: HiddenVisibility;
60
+ }
106
61
  /**
107
62
  * Configuration options for the {@link run} function.
108
63
  *
@@ -163,125 +118,62 @@ interface RunOptions<THelp, TError> {
163
118
  */
164
119
  readonly sectionOrder?: (a: DocSection, b: DocSection) => number;
165
120
  /**
166
- * Help configuration. When provided, enables help functionality.
121
+ * Help configuration. When provided, enables help functionality.
122
+ * At least one of `command` or `option` must be specified.
123
+ *
124
+ * @since 1.0.0
167
125
  */
168
126
  readonly help?: {
169
- /**
170
- * Determines how help is made available:
171
- *
172
- * - `"command"`: Only the `help` subcommand is available
173
- * - `"both"`: Both `help` subcommand and `--help` option are available
174
- *
175
- * @default `"option"`
176
- */
177
- readonly mode: "command" | "both";
178
- /**
179
- * Group label for the help command in help output. When specified,
180
- * the help command appears under a titled section with this name
181
- * instead of alongside user-defined commands.
182
- *
183
- * @since 0.10.0
184
- */
185
- readonly group?: string;
186
- /**
187
- * Callback function invoked when help is requested. The function can
188
- * optionally receive an exit code parameter.
189
- *
190
- * You usually want to pass `process.exit` on Node.js or Bun and
191
- * `Deno.exit` on Deno to this option.
192
- *
193
- * @default Returns `void` when help is shown.
194
- */
127
+ /** Callback invoked when help is requested. */
195
128
  readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
129
+ } & ({
130
+ readonly command: true | CommandSubConfig;
131
+ readonly option?: true | OptionSubConfig;
196
132
  } | {
197
- /**
198
- * Determines how help is made available:
199
- *
200
- * - `"option"`: Only the `--help` option is available
201
- *
202
- * @default `"option"`
203
- */
204
- readonly mode?: "option";
205
- /** @since 0.10.0 */
206
- readonly group?: never;
207
- /**
208
- * Callback function invoked when help is requested. The function can
209
- * optionally receive an exit code parameter.
210
- *
211
- * You usually want to pass `process.exit` on Node.js or Bun and
212
- * `Deno.exit` on Deno to this option.
213
- *
214
- * @default Returns `void` when help is shown.
215
- */
216
- readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
217
- };
133
+ readonly option: true | OptionSubConfig;
134
+ readonly command?: true | CommandSubConfig;
135
+ });
218
136
  /**
219
- * Version configuration. When provided, enables version functionality.
137
+ * Version configuration. When provided, enables version functionality.
138
+ * At least one of `command` or `option` must be specified.
139
+ *
140
+ * @since 1.0.0
220
141
  */
221
142
  readonly version?: {
222
- /**
223
- * Determines how version is made available:
224
- *
225
- * - `"command"`: Only the `version` subcommand is available
226
- * - `"both"`: Both `version` subcommand and `--version` option are
227
- * available
228
- *
229
- * @default `"option"`
230
- */
231
- readonly mode: "command" | "both";
232
- /**
233
- * The version string to display when version is requested.
234
- */
143
+ /** The version string to display when version is requested. */
235
144
  readonly value: string;
236
- /**
237
- * Group label for the version command in help output. When specified,
238
- * the version command appears under a titled section with this name
239
- * instead of alongside user-defined commands.
240
- *
241
- * @since 0.10.0
242
- */
243
- readonly group?: string;
244
- /**
245
- * Callback function invoked when version is requested. The function can
246
- * optionally receive an exit code parameter.
247
- *
248
- * You usually want to pass `process.exit` on Node.js or Bun and
249
- * `Deno.exit` on Deno to this option.
250
- *
251
- * @default Returns `void` when version is shown.
252
- */
145
+ /** Callback invoked when version is requested. */
253
146
  readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
147
+ } & ({
148
+ readonly command: true | CommandSubConfig;
149
+ readonly option?: true | OptionSubConfig;
254
150
  } | {
151
+ readonly option: true | OptionSubConfig;
152
+ readonly command?: true | CommandSubConfig;
153
+ });
154
+ /**
155
+ * Completion configuration. When provided, enables shell completion.
156
+ * At least one of `command` or `option` must be specified.
157
+ *
158
+ * @since 1.0.0
159
+ */
160
+ readonly completion?: {
255
161
  /**
256
- * Determines how version is made available:
257
- *
258
- * - `"option"`: Only the `--version` option is available
259
- *
260
- * @default `"option"`
261
- */
262
- readonly mode?: "option";
263
- /**
264
- * The version string to display when version is requested.
265
- */
266
- readonly value: string;
267
- /** @since 0.10.0 */
268
- readonly group?: never;
269
- /**
270
- * Callback function invoked when version is requested. The function can
271
- * optionally receive an exit code parameter.
162
+ * Available shell completions. By default, includes `bash`, `fish`,
163
+ * `nu`, `pwsh`, and `zsh`.
272
164
  *
273
- * You usually want to pass `process.exit` on Node.js or Bun and
274
- * `Deno.exit` on Deno to this option.
275
- *
276
- * @default Returns `void` when version is shown.
165
+ * @default `{ bash, fish, nu, pwsh, zsh }`
277
166
  */
167
+ readonly shells?: Record<string, ShellCompletion>;
168
+ /** Callback invoked when completion is requested. */
278
169
  readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
279
- };
280
- /**
281
- * Completion configuration. When provided, enables shell completion functionality.
282
- * @since 0.6.0
283
- */
284
- readonly completion?: CompletionConfig<THelp>;
170
+ } & ({
171
+ readonly command: true | CommandSubConfig;
172
+ readonly option?: true | OptionSubConfig;
173
+ } | {
174
+ readonly option: true | OptionSubConfig;
175
+ readonly command?: true | CommandSubConfig;
176
+ });
285
177
  /**
286
178
  * What to display above error messages:
287
179
  * - `"usage"`: Show usage information
@@ -559,4 +451,4 @@ declare function runWithSync<TParser extends Parser<"sync", unknown, unknown>, T
559
451
  */
560
452
  declare function runWithAsync<TParser extends Parser<Mode, unknown, unknown>, TContexts extends readonly SourceContext<unknown>[], THelp = void, TError = never>(parser: TParser, programName: string, contexts: TContexts, options: RunWithOptions<THelp, TError> & ExtractRequiredOptions<TContexts, InferValue<TParser>>): Promise<InferValue<TParser>>;
561
453
  //#endregion
562
- export { CompletionHelpVisibility, CompletionName, ExtractRequiredOptions, type ParserValuePlaceholder, RunOptions, RunParserError, RunWithOptions, type SourceContext, SubstituteParserValue, runParser, runParserAsync, runParserSync, runWith, runWithAsync, runWithSync };
454
+ export { CommandSubConfig, ExtractRequiredOptions, OptionSubConfig, type ParserValuePlaceholder, RunOptions, RunParserError, RunWithOptions, type SourceContext, SubstituteParserValue, runParser, runParserAsync, runParserSync, runWith, runWithAsync, runWithSync };
package/dist/facade.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { Message } from "./message.js";
2
+ import { HiddenVisibility, OptionName } from "./usage.js";
2
3
  import { DocSection, ShowChoicesOptions, ShowDefaultOptions } from "./doc.js";
3
4
  import { InferMode, InferValue, Mode, ModeValue, Parser } from "./parser.js";
4
5
  import { ShellCompletion } from "./completion.js";
@@ -8,101 +9,55 @@ import { Program } from "./program.js";
8
9
  //#region src/facade.d.ts
9
10
 
10
11
  /**
11
- * Naming style for shell completion command and option aliases.
12
+ * Sub-configuration for a meta command's command form.
12
13
  *
13
- * @since 0.10.0
14
- */
15
- type CompletionName = "singular" | "plural" | "both";
16
- /**
17
- * Visibility policy for completion entries in help and usage output.
18
- *
19
- * @since 0.10.0
14
+ * @since 1.0.0
20
15
  */
21
- type CompletionHelpVisibility = CompletionName | "none";
22
- type CompletionConfigBase<THelp> = {
16
+ interface CommandSubConfig {
23
17
  /**
24
- * Determines how completion is made available:
25
- *
26
- * - `"command"`: Only the `completion` subcommand is available
27
- * - `"both"`: Both `completion` subcommand and `--completion` option
28
- * are available
29
- *
30
- * @default `"both"`
18
+ * Command names. The first element is the display name shown in help
19
+ * output; additional elements are hidden aliases that are accepted but
20
+ * not shown.
31
21
  */
32
- readonly mode?: "command" | "both";
22
+ readonly names?: readonly [string, ...string[]];
33
23
  /**
34
- * Group label for the completion command in help output. When specified,
35
- * the completion command appears under a titled section with this name
36
- * instead of alongside user-defined commands.
37
- *
38
- * @since 0.10.0
24
+ * Group label for the command in help output. When specified, the command
25
+ * appears under a titled section with this name instead of alongside
26
+ * user-defined commands.
39
27
  */
40
28
  readonly group?: string;
41
29
  /**
42
- * Available shell completions. By default, includes `bash`, `fish`, `nu`,
43
- * `pwsh`, and `zsh`. You can provide additional custom shell completions
44
- * or override the defaults.
30
+ * Granular visibility control.
45
31
  *
46
- * @default `{ bash, fish, nu, pwsh, zsh }`
32
+ * - `true`: Hidden from usage, documentation, and suggestions.
33
+ * - `"usage"`: Hidden from usage lines only.
34
+ * - `"doc"`: Hidden from documentation only.
47
35
  */
48
- readonly shells?: Record<string, ShellCompletion>;
49
- /**
50
- * Callback function invoked when completion is requested. The function
51
- * can optionally receive an exit code parameter.
52
- *
53
- * You usually want to pass `process.exit` on Node.js or Bun and
54
- * `Deno.exit` on Deno to this option.
55
- *
56
- * @default Returns `void` when completion is shown.
57
- */
58
- readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
59
- } | {
36
+ readonly hidden?: HiddenVisibility;
37
+ }
38
+ /**
39
+ * Sub-configuration for a meta command's option form.
40
+ *
41
+ * @since 1.0.0
42
+ */
43
+ interface OptionSubConfig {
60
44
  /**
61
- * Determines how completion is made available:
62
- *
63
- * - `"option"`: Only the `--completion` option is available
45
+ * Option names (all shown in help, e.g., `"-h"`, `"--help"`).
64
46
  */
65
- readonly mode: "option";
66
- /** @since 0.10.0 */
67
- readonly group?: never;
68
- /** @default `{ bash, fish, nu, pwsh, zsh }` */
69
- readonly shells?: Record<string, ShellCompletion>;
70
- /** @default Returns `void` when completion is shown. */
71
- readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
72
- };
73
- type CompletionConfigBoth<THelp> = CompletionConfigBase<THelp> & {
47
+ readonly names?: readonly [OptionName, ...OptionName[]];
74
48
  /**
75
- * Determines whether to use singular or plural naming for completion command/option.
76
- *
77
- * - `"singular"`: Use `completion` / `--completion`
78
- * - `"plural"`: Use `completions` / `--completions`
79
- * - `"both"`: Use both singular and plural forms
80
- *
81
- * @default `"both"`
49
+ * Group label for the option in help output.
82
50
  */
83
- readonly name?: "both";
51
+ readonly group?: string;
84
52
  /**
85
- * Controls which completion entries appear in help and usage output.
86
- *
87
- * - `"both"`: Show both singular and plural entries
88
- * - `"singular"`: Show only singular entries
89
- * - `"plural"`: Show only plural entries
90
- * - `"none"`: Hide completion entries from help and usage
53
+ * Granular visibility control.
91
54
  *
92
- * @default Matches `name`
93
- * @since 0.10.0
55
+ * - `true`: Hidden from usage, documentation, and suggestions.
56
+ * - `"usage"`: Hidden from usage lines only.
57
+ * - `"doc"`: Hidden from documentation only.
94
58
  */
95
- readonly helpVisibility?: CompletionHelpVisibility;
96
- };
97
- type CompletionConfigSingular<THelp> = CompletionConfigBase<THelp> & {
98
- readonly name: "singular";
99
- readonly helpVisibility?: "singular" | "none";
100
- };
101
- type CompletionConfigPlural<THelp> = CompletionConfigBase<THelp> & {
102
- readonly name: "plural";
103
- readonly helpVisibility?: "plural" | "none";
104
- };
105
- type CompletionConfig<THelp> = CompletionConfigBoth<THelp> | CompletionConfigSingular<THelp> | CompletionConfigPlural<THelp>;
59
+ readonly hidden?: HiddenVisibility;
60
+ }
106
61
  /**
107
62
  * Configuration options for the {@link run} function.
108
63
  *
@@ -163,125 +118,62 @@ interface RunOptions<THelp, TError> {
163
118
  */
164
119
  readonly sectionOrder?: (a: DocSection, b: DocSection) => number;
165
120
  /**
166
- * Help configuration. When provided, enables help functionality.
121
+ * Help configuration. When provided, enables help functionality.
122
+ * At least one of `command` or `option` must be specified.
123
+ *
124
+ * @since 1.0.0
167
125
  */
168
126
  readonly help?: {
169
- /**
170
- * Determines how help is made available:
171
- *
172
- * - `"command"`: Only the `help` subcommand is available
173
- * - `"both"`: Both `help` subcommand and `--help` option are available
174
- *
175
- * @default `"option"`
176
- */
177
- readonly mode: "command" | "both";
178
- /**
179
- * Group label for the help command in help output. When specified,
180
- * the help command appears under a titled section with this name
181
- * instead of alongside user-defined commands.
182
- *
183
- * @since 0.10.0
184
- */
185
- readonly group?: string;
186
- /**
187
- * Callback function invoked when help is requested. The function can
188
- * optionally receive an exit code parameter.
189
- *
190
- * You usually want to pass `process.exit` on Node.js or Bun and
191
- * `Deno.exit` on Deno to this option.
192
- *
193
- * @default Returns `void` when help is shown.
194
- */
127
+ /** Callback invoked when help is requested. */
195
128
  readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
129
+ } & ({
130
+ readonly command: true | CommandSubConfig;
131
+ readonly option?: true | OptionSubConfig;
196
132
  } | {
197
- /**
198
- * Determines how help is made available:
199
- *
200
- * - `"option"`: Only the `--help` option is available
201
- *
202
- * @default `"option"`
203
- */
204
- readonly mode?: "option";
205
- /** @since 0.10.0 */
206
- readonly group?: never;
207
- /**
208
- * Callback function invoked when help is requested. The function can
209
- * optionally receive an exit code parameter.
210
- *
211
- * You usually want to pass `process.exit` on Node.js or Bun and
212
- * `Deno.exit` on Deno to this option.
213
- *
214
- * @default Returns `void` when help is shown.
215
- */
216
- readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
217
- };
133
+ readonly option: true | OptionSubConfig;
134
+ readonly command?: true | CommandSubConfig;
135
+ });
218
136
  /**
219
- * Version configuration. When provided, enables version functionality.
137
+ * Version configuration. When provided, enables version functionality.
138
+ * At least one of `command` or `option` must be specified.
139
+ *
140
+ * @since 1.0.0
220
141
  */
221
142
  readonly version?: {
222
- /**
223
- * Determines how version is made available:
224
- *
225
- * - `"command"`: Only the `version` subcommand is available
226
- * - `"both"`: Both `version` subcommand and `--version` option are
227
- * available
228
- *
229
- * @default `"option"`
230
- */
231
- readonly mode: "command" | "both";
232
- /**
233
- * The version string to display when version is requested.
234
- */
143
+ /** The version string to display when version is requested. */
235
144
  readonly value: string;
236
- /**
237
- * Group label for the version command in help output. When specified,
238
- * the version command appears under a titled section with this name
239
- * instead of alongside user-defined commands.
240
- *
241
- * @since 0.10.0
242
- */
243
- readonly group?: string;
244
- /**
245
- * Callback function invoked when version is requested. The function can
246
- * optionally receive an exit code parameter.
247
- *
248
- * You usually want to pass `process.exit` on Node.js or Bun and
249
- * `Deno.exit` on Deno to this option.
250
- *
251
- * @default Returns `void` when version is shown.
252
- */
145
+ /** Callback invoked when version is requested. */
253
146
  readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
147
+ } & ({
148
+ readonly command: true | CommandSubConfig;
149
+ readonly option?: true | OptionSubConfig;
254
150
  } | {
151
+ readonly option: true | OptionSubConfig;
152
+ readonly command?: true | CommandSubConfig;
153
+ });
154
+ /**
155
+ * Completion configuration. When provided, enables shell completion.
156
+ * At least one of `command` or `option` must be specified.
157
+ *
158
+ * @since 1.0.0
159
+ */
160
+ readonly completion?: {
255
161
  /**
256
- * Determines how version is made available:
257
- *
258
- * - `"option"`: Only the `--version` option is available
259
- *
260
- * @default `"option"`
261
- */
262
- readonly mode?: "option";
263
- /**
264
- * The version string to display when version is requested.
265
- */
266
- readonly value: string;
267
- /** @since 0.10.0 */
268
- readonly group?: never;
269
- /**
270
- * Callback function invoked when version is requested. The function can
271
- * optionally receive an exit code parameter.
162
+ * Available shell completions. By default, includes `bash`, `fish`,
163
+ * `nu`, `pwsh`, and `zsh`.
272
164
  *
273
- * You usually want to pass `process.exit` on Node.js or Bun and
274
- * `Deno.exit` on Deno to this option.
275
- *
276
- * @default Returns `void` when version is shown.
165
+ * @default `{ bash, fish, nu, pwsh, zsh }`
277
166
  */
167
+ readonly shells?: Record<string, ShellCompletion>;
168
+ /** Callback invoked when completion is requested. */
278
169
  readonly onShow?: (() => THelp) | ((exitCode: number) => THelp);
279
- };
280
- /**
281
- * Completion configuration. When provided, enables shell completion functionality.
282
- * @since 0.6.0
283
- */
284
- readonly completion?: CompletionConfig<THelp>;
170
+ } & ({
171
+ readonly command: true | CommandSubConfig;
172
+ readonly option?: true | OptionSubConfig;
173
+ } | {
174
+ readonly option: true | OptionSubConfig;
175
+ readonly command?: true | CommandSubConfig;
176
+ });
285
177
  /**
286
178
  * What to display above error messages:
287
179
  * - `"usage"`: Show usage information
@@ -559,4 +451,4 @@ declare function runWithSync<TParser extends Parser<"sync", unknown, unknown>, T
559
451
  */
560
452
  declare function runWithAsync<TParser extends Parser<Mode, unknown, unknown>, TContexts extends readonly SourceContext<unknown>[], THelp = void, TError = never>(parser: TParser, programName: string, contexts: TContexts, options: RunWithOptions<THelp, TError> & ExtractRequiredOptions<TContexts, InferValue<TParser>>): Promise<InferValue<TParser>>;
561
453
  //#endregion
562
- export { CompletionHelpVisibility, CompletionName, ExtractRequiredOptions, type ParserValuePlaceholder, RunOptions, RunParserError, RunWithOptions, type SourceContext, SubstituteParserValue, runParser, runParserAsync, runParserSync, runWith, runWithAsync, runWithSync };
454
+ export { CommandSubConfig, ExtractRequiredOptions, OptionSubConfig, type ParserValuePlaceholder, RunOptions, RunParserError, RunWithOptions, type SourceContext, SubstituteParserValue, runParser, runParserAsync, runParserSync, runWith, runWithAsync, runWithSync };