cmd-ts
Version:
> 💻 A type-driven command line argument parser, with awesome error reporting 🤤
13 lines (12 loc) • 730 B
TypeScript
import { ArgParser, Register } from './argparser';
import { OutputOf } from './from';
import { ProvidesHelp, LongDoc, ShortDoc, Descriptive } from './helpdoc';
import { Type, HasType } from './type';
import { Default } from './default';
declare type MultiOptionConfig<Decoder extends Type<string[], any>> = HasType<Decoder> & LongDoc & Partial<ShortDoc & Descriptive & Default<OutputOf<Decoder>>>;
/**
* Like `option`, but can accept multiple options, and expects a decoder from a list of strings.
* An error will highlight all option occurences.
*/
export declare function multioption<Decoder extends Type<string[], any>>(config: MultiOptionConfig<Decoder>): ArgParser<OutputOf<Decoder>> & ProvidesHelp & Register;
export {};