Skip to content
Myr

TypeScript for addHelpCommand (#1375)

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 f15900d · Browse files · 2 files+18 added−0 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+18 added−0 removed

  • other:+18 added−0 removed

2 files+18 added−0 removed

modified:typings/commander-tests.ts+7 added
53 unmodified lines
5455// arguments56const argumentsThis: commander.Command = program.arguments('<cmd> [env]');5758// addHelpCommand59const addHelpCommandThis1: commander.Command = program.addHelpCommand();60const addHelpCommandThis3: commander.Command = program.addHelpCommand(false);61const addHelpCommandThis2: commander.Command = program.addHelpCommand(true);62const addHelpCommandThis4: commander.Command = program.addHelpCommand('compress <file>');63const addHelpCommandThis5: commander.Command = program.addHelpCommand('compress <file>', 'compress target file');6465// exitOverride66const exitThis1: commander.Command = program.exitOverride();67const exitThis2: commander.Command = program.exitOverride((err): never => {68 return process.exit(err.exitCode);
166 unmodified lines
modified:typings/index.d.ts+11 added
108 unmodified lines
109 */110 arguments(desc: string): this;111112 /**113 * Override default decision whether to add implicit help command.114 *115 * addHelpCommand() // force on116 * addHelpCommand(false); // force off117 * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details118 *119 * @returns `this` command for chaining120 */121 addHelpCommand(enableOrNameAndArgs?: string | boolean, description?: string): this;122123 /**124 * Register callback to use as replacement for calling process.exit.125 */126 exitOverride(callback?: (err: CommanderError) => never|void): this;127
283 unmodified lines