Skip to content

Commit

Permalink
Add options and registeredArguments properties to Command (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
shadowspawn authored Oct 15, 2023
1 parent a6f71e5 commit 8559a13
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,8 @@ export class CommanderError extends Error {
args: string[];
processedArgs: Args;
commands: CommandUnknownOpts[];
readonly options: readonly Option[];
readonly registeredArguments: readonly Argument[];
parent: CommandUnknownOpts | null;

constructor(name?: string);
Expand Down
2 changes: 2 additions & 0 deletions tests/commander.test-d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ expectType<string[]>(program.args);
// eslint-disable-next-line @typescript-eslint/no-explicit-any
expectType<[]>(program.processedArgs);
expectType<commander.CommandUnknownOpts[]>(program.commands);
expectType<readonly commander.Option[]>(program.options);
expectType<readonly commander.Argument[]>(program.registeredArguments);
expectType<commander.CommandUnknownOpts | null>(program.parent);

// version
Expand Down

0 comments on commit 8559a13

Please sign in to comment.