Skip to content
Myr

Add Command parent property to TypeScript (#1475)

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

authored by John Gee · committed by GitHub · parent 948796d · Browse files · 2 files+2 added−1 removed
This commit

State

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

Diff stats

2 files+2 added−1 removed

  • other:+2 added−1 removed

2 files+2 added−1 removed

modified:typings/index.d.ts+1 added-1 removed
154 unmodified lines
155 }156157 interface Command {158 args: string[];159159 commands: Command[];160 parent: Command | null;161162 /**163 * Set the program version to `str`.164 *
457 unmodified lines
modified:typings/index.test-d.ts+1 added
19 unmodified lines
2021// Command properties22expectType<string[]>(program.args);23expectType<commander.Command[]>(program.commands);24expectType<commander.Command | null>(program.parent);2526// version27expectType<commander.Command>(program.version('1.2.3'));28expectType<commander.Command>(program.version('1.2.3', '-r,--revision'));
298 unmodified lines