Commit 6cff318 1 parent 1c29b98 commit 6cff318 Copy full SHA for 6cff318
File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -453,7 +453,8 @@ export class CommanderError extends Error {
453
453
export class Command < Args extends any [ ] = [ ] , Opts extends OptionValues = { } > {
454
454
args : string [ ] ;
455
455
processedArgs : Args ;
456
- commands : CommandUnknownOpts [ ] ;
456
+ readonly commands : readonly CommandUnknownOpts [ ] ;
457
+ readonly options : readonly Option [ ] ;
457
458
parent : CommandUnknownOpts | null ;
458
459
459
460
constructor ( name ?: string ) ;
Original file line number Diff line number Diff line change @@ -40,7 +40,8 @@ expectType<commander.Argument>(commander.createArgument('<foo>'));
40
40
expectType < string [ ] > ( program . args ) ;
41
41
// eslint-disable-next-line @typescript-eslint/no-explicit-any
42
42
expectType < [ ] > ( program . processedArgs ) ;
43
- expectType < commander . CommandUnknownOpts [ ] > ( program . commands ) ;
43
+ expectType < readonly commander . CommandUnknownOpts [ ] > ( program . commands ) ;
44
+ expectType < readonly commander . Option [ ] > ( program . options ) ;
44
45
expectType < commander . CommandUnknownOpts | null > ( program . parent ) ;
45
46
46
47
// version
You can’t perform that action at this time.
0 commit comments