UNPKG

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 (30 loc) 760 B
/** * @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 declare type CommandActionHandler = ((...args: any[]) => any | Promise<any>) | { instance: any; methodName: string; }; /** * The wrapper type of a Command action handler * Note: The last argument is always the command */ export declare type CommandActionWrapper = (...args: any[]) => Promise<CommandResponse>; /** * The response of the */ export interface CommandResponse { data: any; command: commander.Command; }