UNPKG

reiso

Version:
18 lines (17 loc) 519 B
/// <reference types="node" /> import * as rl from 'readline'; export declare type Action = (args: string[], read: () => rl.ReadLine) => (Promise<void> | void); export declare type Command = { description?: string; action: Action; }; export declare class Commander { protected commands: { [name: string]: Command; }; constructor(commands: { [name: string]: Command; }); getAction(name: string): Action; run(name: string, args: string[], exit?: boolean): Promise<void>; }