UNPKG

synopt

Version:

Command line options package

29 lines (28 loc) 747 B
interface Command { name: (text: string) => Command; summary: (text: string) => Command; description: (text: string) => Command; option: (...args: DeclarationTuple) => Command; parse: (args: string[]) => object; declarations: () => OptionDeclaration[]; usage: () => string; } type OptionDeclaration = { boolean?: boolean; repeat?: boolean; short?: string; argname?: string; long?: string; name?: string; description?: string; }; type DeclarationTuple = [ name: string, alias?: string, description?: string, options?: OptionDeclaration ]; declare const createCommand: (name?: string) => Command; declare const synopt: Command; export default synopt; export { createCommand };