diff --git a/typings/index.d.ts b/typings/index.d.ts index 36163d3f8..6fe954083 100644 --- a/typings/index.d.ts +++ b/typings/index.d.ts @@ -156,8 +156,8 @@ declare namespace commander { interface Command { args: string[]; - commands: Command[]; + parent: Command | null; /** * Set the program version to `str`. diff --git a/typings/index.test-d.ts b/typings/index.test-d.ts index 6b56e5f0b..061cf4bb6 100644 --- a/typings/index.test-d.ts +++ b/typings/index.test-d.ts @@ -21,6 +21,7 @@ expectType(commander.createCommand()); // Command properties expectType(program.args); expectType(program.commands); +expectType(program.parent); // version expectType(program.version('1.2.3'));