From 14fb529183d9c46ae5b8611ac70bdcb2b62e54f0 Mon Sep 17 00:00:00 2001
From: Wee Bit <aweebit64@gmail.com>
Date: Thu, 3 Aug 2023 13:04:15 +0300
Subject: [PATCH] Fix version() parameter type

Borrowed from a3f0e28 that was supposed to land in the now-closed #1921.
---
 lib/command.js     | 2 +-
 typings/index.d.ts | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/lib/command.js b/lib/command.js
index 8289bf25b..011e48ece 100644
--- a/lib/command.js
+++ b/lib/command.js
@@ -1807,7 +1807,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
    *
    * You can optionally supply the  flags and description to override the defaults.
    *
-   * @param {string} str
+   * @param {string} [str]
    * @param {string} [flags]
    * @param {string} [description]
    * @return {this | string} `this` command for chaining, or version string if no arguments
diff --git a/typings/index.d.ts b/typings/index.d.ts
index c9d3c314c..85d81903a 100644
--- a/typings/index.d.ts
+++ b/typings/index.d.ts
@@ -293,7 +293,7 @@ export class Command {
    *
    * You can optionally supply the  flags and description to override the defaults.
    */
-  version(str: string, flags?: string, description?: string): this;
+  version(str?: string, flags?: string, description?: string): this;
 
   /**
    * Define a command, implemented using an action handler.