Skip to content

Commit e8bea4a

Browse files
committed
Fix version() parameter type
Borrowed from a3f0e28 that was supposed to land in the now-closed tj#1921.
1 parent d038570 commit e8bea4a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1807,7 +1807,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
18071807
*
18081808
* You can optionally supply the flags and description to override the defaults.
18091809
*
1810-
* @param {string} str
1810+
* @param {string} [str]
18111811
* @param {string} [flags]
18121812
* @param {string} [description]
18131813
* @return {this | string} `this` command for chaining, or version string if no arguments

typings/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@ 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;
297297

298298
/**
299299
* Define a command, implemented using an action handler.

0 commit comments

Comments
 (0)