Skip to content

Commit 68a4276

Browse files
aweebitabetomo
authored andcommitted
Fix executableDir() return type
1 parent 880b028 commit 68a4276

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

lib/command.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1964,7 +1964,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
19641964
* program.executableDir('subcommands');
19651965
*
19661966
* @param {string} [path]
1967-
* @return {string|Command}
1967+
* @return {string|null|Command}
19681968
*/
19691969

19701970
executableDir(path) {

typings/index.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -819,7 +819,7 @@ export class Command {
819819
/**
820820
* Get the executable search directory.
821821
*/
822-
executableDir(): string;
822+
executableDir(): string | null;
823823

824824
/**
825825
* Output help information for this command.

typings/index.test-d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ expectType<commander.Command>(program.nameFromFilename(__filename));
275275

276276
// executableDir
277277
expectType<commander.Command>(program.executableDir(__dirname));
278-
expectType<string>(program.executableDir());
278+
expectType<string | null>(program.executableDir());
279279

280280
// outputHelp
281281
// eslint-disable-next-line @typescript-eslint/no-invalid-void-type, @typescript-eslint/no-confusing-void-expression

0 commit comments

Comments
 (0)