@commander-js/extra-typings
Advanced tools
Comparing version 12.0.0-1 to 12.0.0
@@ -589,19 +589,27 @@ | ||
arguments<Names extends string>(args: Names): Command<[...Args, ...InferArguments<Names>], Opts>; | ||
/** | ||
* Override default decision whether to add implicit help command. | ||
* Customise or override default help command. By default a help command is automatically added if your command has subcommands. | ||
* | ||
* @example | ||
* ```ts | ||
* program.helpCommand('help [cmd]'); | ||
* program.helpCommand('help [cmd]', 'show help'); | ||
* program.helpCommand(false); // suppress default help command | ||
* program.helpCommand(true); // add help command even if no subcommands | ||
* ``` | ||
* addHelpCommand() // force on | ||
* addHelpCommand(false); // force off | ||
* addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details | ||
* ``` | ||
* | ||
* @returns `this` command for chaining | ||
*/ | ||
addHelpCommand(enableOrNameAndArgs?: string | boolean, description?: string): this; | ||
helpCommand(nameAndArgs: string, description?: string): this; | ||
helpCommand(enable: boolean): this; | ||
/** | ||
* Add prepared custom help command. | ||
*/ | ||
addHelpCommand(cmd: Command): this; | ||
/** @deprecated since v12, instead use helpCommand */ | ||
addHelpCommand(nameAndArgs: string, description?: string): this; | ||
/** @deprecated since v12, instead use helpCommand */ | ||
addHelpCommand(enable?: boolean): this; | ||
/** | ||
* Add hook for life cycle event. | ||
@@ -1027,2 +1035,8 @@ */ | ||
/** | ||
* Supply your own option to use for the built-in help option. | ||
* This is an alternative to using helpOption() to customise the flags and description etc. | ||
*/ | ||
addHelpOption(option: Option): this; | ||
/** | ||
* Output help information and exit. | ||
@@ -1029,0 +1043,0 @@ * |
{ | ||
"name": "@commander-js/extra-typings", | ||
"version": "12.0.0-1", | ||
"version": "12.0.0", | ||
"description": "Infer strong typings for commander options and action handlers", | ||
@@ -48,13 +48,13 @@ "main": "index.js", | ||
"peerDependencies": { | ||
"commander": "12.0.0-0" | ||
"commander": "~12.0.0" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^29.2.6", | ||
"@types/node": "^18.7.16", | ||
"commander": "~12.0.0-0", | ||
"@types/node": "^20.11.7", | ||
"commander": "~12.0.0", | ||
"jest": "^29.3.1", | ||
"ts-jest": "^29.0.5", | ||
"tsd": "^0.22.0", | ||
"typescript": "^4.7.4" | ||
"tsd": "^0.30.4", | ||
"typescript": "^5.3.3" | ||
} | ||
} |
@@ -6,3 +6,3 @@ # extra-typings for commander | ||
This package offers experimental TypeScript typings for `commander` which infer strong types for: | ||
This package offers TypeScript typings for `commander` which infer strong types for: | ||
@@ -9,0 +9,0 @@ - all the parameters of the action handler, including the options |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
49147
985
0