UNPKG

cmd-ts

Version:

> 💻 A type-driven command line argument parser, with awesome error reporting 🤤

12 lines (11 loc) • 639 B
import { ArgParser } from './argparser'; import { From, OutputOf } from './from'; import { ProvidesHelp, LongDoc, Descriptive, ShortDoc } from './helpdoc'; import { HasType } from './type'; declare type MultiFlagConfig<Decoder extends From<boolean[], any>> = HasType<Decoder> & LongDoc & Partial<Descriptive & ShortDoc>; /** * 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 multiflag<Decoder extends From<boolean[], any>>(config: MultiFlagConfig<Decoder>): ArgParser<OutputOf<Decoder>> & ProvidesHelp; export {};