import { AlphabetLowercase, AlphabetUppercase } from './alphabet'; export declare type DefaultContext = { options: IOptionFlag; flags: { [k: string]: string; }; }; export declare type Default = T | ((context: DefaultContext) => T); export declare type IFlagBase = { name: string; char?: AlphabetLowercase | AlphabetUppercase; description?: string; helpLabel?: string; hidden?: boolean; required?: boolean; dependsOn?: string[]; exclusive?: string[]; exactlyOne?: string[]; /** * also accept an environment variable as input */ env?: string; parse(input: I, context: any): T; }; export declare type IBooleanFlag = IFlagBase & { type: 'boolean'; allowNo: boolean; /** * specifying a default of false is the same not specifying a default */ default?: Default; }; export declare type IOptionFlag = IFlagBase & { type: 'option'; helpValue?: string; default?: Default; multiple: boolean; input: string[]; options?: string[]; }; export declare type Definition = { (options: { multiple: true; } & Partial>): IOptionFlag; (options: ({ required: true; } | { default: Default; }) & Partial>): IOptionFlag; (options?: Partial>): IOptionFlag; }; export declare type EnumFlagOptions = Partial> & { options: T[]; }; export declare type IFlag = IBooleanFlag | IOptionFlag; export declare function build(defaults: { parse: IOptionFlag['parse']; } & Partial>): Definition; export declare function build(defaults: Partial>): Definition; export declare function boolean(options?: Partial>): IBooleanFlag; export declare const integer: Definition; export declare function option(options: { parse: IOptionFlag['parse']; } & Partial>): IOptionFlag; declare const stringFlag: Definition; export { stringFlag as string }; export declare const defaultFlags: { color: IBooleanFlag; }; export declare type Output = { [name: string]: any; }; export declare type Input = { [P in keyof T]: IFlag; };