import * as Result from "./Result"; import type { ArgParser, ParseContext, Register } from "./argparser"; import type { PrintHelp, ProvidesHelp, Versioned } from "./helpdoc"; type CircuitBreaker = "help" | "version"; export declare const helpFlag: Partial & { parse(context: ParseContext): Promise>; } & ProvidesHelp & Register & Partial; export declare const versionFlag: Partial & { parse(context: ParseContext): Promise>; } & ProvidesHelp & Register & Partial; export declare function handleCircuitBreaker(context: ParseContext, value: PrintHelp & Partial, breaker: Result.Result): void; /** * Helper flags that are being used in `command` and `subcommands`: * `--help, -h` to show help * `--version, -v` to show the current version * * It is called circuitbreaker because if you have `--help` or `--version` * anywhere in your argument list, you'll see the version and the help for the closest command */ export declare function createCircuitBreaker(withVersion: boolean): ArgParser & ProvidesHelp & Register; export {};