Skip to content

Commit 610244d

Browse files
committed
Merge branch 'feature/createOption-in-helpOption' into feature/helpOption-only-short
2 parents ddc338a + fad505b commit 610244d

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

typings/index.d.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,8 @@ export class Command {
293293
*
294294
* You can optionally supply the flags and description to override the defaults.
295295
*/
296-
version(str?: string, flags?: string, description?: string): this;
296+
version(str: string, flags?: string, description?: string): this;
297+
version(): string;
297298

298299
/**
299300
* Define a command, implemented using an action handler.

typings/index.test-d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ expectType<commander.Command | null>(program.parent);
3636
expectType<commander.Command>(program.version('1.2.3'));
3737
expectType<commander.Command>(program.version('1.2.3', '-r,--revision'));
3838
expectType<commander.Command>(program.version('1.2.3', '-r,--revision', 'show revision information'));
39+
expectType<string>(program.version());
3940

4041
// command (and CommandOptions)
4142
expectType<commander.Command>(program.command('action'));

0 commit comments

Comments
 (0)