import type { ArgParser, Register } from "./argparser"; import type { Default, OnMissing } from "./default"; import type { Descriptive, EnvDoc, LongDoc, ProvidesHelp, ShortDoc } from "./helpdoc"; import { type HasType, type OutputOf, type Type } from "./type"; import type { AllOrNothing } from "./utils"; type FlagConfig> = LongDoc & HasType & Partial>> & AllOrNothing>>; /** * A decoder from `string` to `boolean` * works for `true` and `false` only. */ export declare const boolean: Type; export declare function fullFlag>(config: FlagConfig): ArgParser> & ProvidesHelp & Register & Partial; type BooleanType = Type; /** * Decodes an argument which is in the form of a key and a boolean value, and allows parsing the following ways: * * - `--long` where `long` is the provided `long` * - `-s=value` where `s` is the provided `short` * Shorthand forms can be combined: * - `-abcd` will call all flags for the short forms of `a`, `b`, `c` and `d`. * @param config flag configurations */ export declare function flag>(config: FlagConfig): ArgParser> & ProvidesHelp & Register & Partial; export declare function flag(config: LongDoc & Partial & ShortDoc & Descriptive & EnvDoc & OnMissing>> & AllOrNothing>>): ArgParser> & ProvidesHelp & Register & Partial; export {};