Skip to content

Commit c38e92c

Browse files
committed
fix: make command description optional
1 parent 30347be commit c38e92c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/CAC.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class CAC extends EventEmitter {
6565
/**
6666
* Add a sub-command
6767
*/
68-
command(rawName: string, description: string, config?: CommandConfig) {
69-
const command = new Command(rawName, description, config, this)
68+
command(rawName: string, description?: string, config?: CommandConfig) {
69+
const command = new Command(rawName, description || '', config, this)
7070
command.globalCommand = this.globalCommand
7171
this.commands.push(command)
7272
return command

0 commit comments

Comments
 (0)