Comparing version 3.2.0-rc.2 to 3.2.0-rc.3
@@ -7,2 +7,4 @@ /// <reference types="node" /> | ||
import { CommandOption } from './options/utils'; | ||
declare type MakeOptional<T, Keys extends keyof T> = Omit<T, Keys> & Partial<Pick<T, Keys>>; | ||
declare type VoidIfEmpty<T> = keyof T extends never ? void : never; | ||
/** | ||
@@ -169,3 +171,4 @@ * The base context of the CLI. | ||
process(input: Array<string>): Command<Context>; | ||
run(input: Command<Context> | Array<string>, userContext: RunContext<Context>): Promise<number>; | ||
run(input: Command<Context> | Array<string>, context: VoidIfEmpty<Omit<Context, keyof BaseContext>>): Promise<number>; | ||
run(input: Command<Context> | Array<string>, context: MakeOptional<Context, keyof BaseContext>): Promise<number>; | ||
/** | ||
@@ -179,3 +182,4 @@ * Runs a command and exits the current `process` with the exit code returned by the command. | ||
*/ | ||
runExit(input: Command<Context> | Array<string>, context: RunContext<Context>): Promise<void>; | ||
runExit(input: Command<Context> | Array<string>, context: VoidIfEmpty<Omit<Context, keyof BaseContext>>): Promise<void>; | ||
runExit(input: Command<Context> | Array<string>, context: MakeOptional<Context, keyof BaseContext>): Promise<void>; | ||
suggest(input: Array<string>, partial: boolean): string[][]; | ||
@@ -218,1 +222,2 @@ definitions({ colored }?: { | ||
} | ||
export {}; |
@@ -156,10 +156,2 @@ 'use strict'; | ||
} | ||
/** | ||
* Runs a command and exits the current `process` with the exit code returned by the command. | ||
* | ||
* @param input An array containing the name of the command and its arguments. | ||
* | ||
* @example | ||
* cli.runExit(process.argv.slice(2)) | ||
*/ | ||
async runExit(input, context) { | ||
@@ -166,0 +158,0 @@ process.exitCode = await this.run(input, context); |
{ | ||
"name": "clipanion", | ||
"version": "3.2.0-rc.2", | ||
"version": "3.2.0-rc.3", | ||
"main": "lib/advanced/index", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
Sorry, the diff of this file is not supported yet
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
205542
4839