UNPKG

tiny-bin

Version:

A library for building tiny and beautiful command line apps.

15 lines (14 loc) 714 B
import Addon from './addon.js'; import ChainableBinLocal from './chainable_bin_local.js'; import type Bin from './bin.js'; import type Command from './command.js'; import type { ArgumentOptions, CommandHandler, OptionOptions } from '../types.js'; declare class ChainableCommand extends Addon { protected command: Command; constructor(bin: Bin, command: Command); usage(usage: string): this; option(name: string, description: string, options?: Omit<OptionOptions, 'name' | 'description'>): this; argument(name: string, description: string, options?: Omit<ArgumentOptions, 'name' | 'description'>): this; action(handler: CommandHandler): ChainableBinLocal; } export default ChainableCommand;