import { type Result } from "./Result"; import type { ArgParser, ParseContext, ParsingResult, Register } from "./argparser"; import { Exit } from "./effects"; import type { PrintHelp, Versioned } from "./helpdoc"; export type Handling = { handler: (values: Values) => Result; }; export type Runner = PrintHelp & Partial & Register & Handling & ArgParser & { run(context: ParseContext): Promise>; }; export type Into> = R extends Runner ? X : never; export declare function run>(ap: R, strings: string[]): Promise>; /** * Runs a command but does not apply any effect */ export declare function runSafely>(ap: R, strings: string[]): Promise>>; /** * Run a command but don't quit. Returns an `Result` instead. */ export declare function dryRun>(ap: R, strings: string[]): Promise>>; /** * Parse the command as if to run it, but only return the parse result and don't run the command. */ export declare function parse>(ap: R, strings: string[]): Promise>;