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 cab9817
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: ReadonlyArray<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<ReadonlyArray<Readonly<commander.Option>>>(program.options);

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

0 comments on commit cab9817

Please sign in to comment.