Skip to content
Myr

Fix executableDir() return type

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Wee Bit · committed by Abe Tomoaki · parent 880b028 · Browse files · 3 files+3 added−3 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+3 added−3 removed

  • other:+3 added−3 removed

3 files+3 added−3 removed

modified:lib/command.js+1 added-1 removed
1962 unmodified lines
1963 * // or1964 * program.executableDir('subcommands');1965 *1966 * @param {string} [path]1967 * @return {string|Command}1967 * @return {string|null|Command}1968 */19691970 executableDir(path) {1971 if (path === undefined) return this._executableDir;
225 unmodified lines
modified:typings/index.d.ts+1 added-1 removed
817 unmodified lines
818 executableDir(path: string): this;819 /**820 * Get the executable search directory.821 */822 executableDir(): string;822 executableDir(): string | null;823824 /**825 * Output help information for this command.826 *
63 unmodified lines
modified:typings/index.test-d.ts+1 added-1 removed
273 unmodified lines
274expectType<commander.Command>(program.nameFromFilename(__filename));275276// executableDir277expectType<commander.Command>(program.executableDir(__dirname));278expectType<string>(program.executableDir());278expectType<string | null>(program.executableDir());279280// outputHelp281// eslint-disable-next-line @typescript-eslint/no-invalid-void-type, @typescript-eslint/no-confusing-void-expression282expectType<void>(program.outputHelp());
199 unmodified lines