Socket
Socket
Sign inDemoInstall

@commander-js/extra-typings

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@commander-js/extra-typings - npm Package Compare versions

Comparing version 12.0.0-1 to 12.0.0

34

index.d.ts

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc