rucken
Version:
Console tools and scripts for nx and not only that I (EndyKaufman) use to automate the workflow and speed up the development process
31 lines • 826 B
TypeScript
/**
* @module Interfaces
*/
import * as commander from 'commander';
/**
* The Command action handler type
* Arguments are ordered this way:
* arg1, arg2, ...otherArgs, command
*
* args: any[],
* command: commander.Command
*
* storeOptionsAsProperties is set to false, to get options, use command.opts()
*/
export type CommandActionHandler = ((...args: unknown[]) => unknown | Promise<unknown>) | {
instance: unknown;
methodName: string;
};
/**
* The wrapper type of a Command action handler
* Note: The last argument is always the command
*/
export type CommandActionWrapper = (...args: unknown[]) => Promise<CommandResponse>;
/**
* The response of the command execution
*/
export interface CommandResponse {
data: unknown;
command: commander.Command;
}
//# sourceMappingURL=interfaces.d.ts.map