Skip to content

Commit

Permalink
expose options as readonly
Browse files Browse the repository at this point in the history
  • Loading branch information
mshima committed Aug 29, 2022
1 parent 82fcb98 commit 8a7ca87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions typings/index.d.ts
Expand Up @@ -277,6 +277,7 @@ export class Command {
processedArgs: any[];
commands: Command[];
parent: Command | null;
readonly options: Readonly<Option>[];

constructor(name?: string);

Expand Down
1 change: 1 addition & 0 deletions typings/index.test-d.ts
Expand Up @@ -30,6 +30,7 @@ expectType<string[]>(program.args);
expectType<any[]>(program.processedArgs);
expectType<commander.Command[]>(program.commands);
expectType<commander.Command | null>(program.parent);
expectType<Readonly<commander.Option>[]>(program.options);

// version
expectType<commander.Command>(program.version('1.2.3'));
Expand Down

0 comments on commit 8a7ca87

Please sign in to comment.