import type { FlagOptions, ParseFlagsContext, ParseFlagsOptions } from "./types.js"; /** * Parse command line arguments. * @param argsOrCtx Command line arguments e.g: `Deno.args` or parse context. * @param opts Parse options. * * ``` * // examples/flags/flags.ts -x 3 -y.z -n5 -abc --beep=boop foo bar baz --deno.land --deno.com -- --cliffy * parseFlags(Deno.args); * ``` * * Output: * * ``` * { * flags: { * x: "3", * y: { z: true }, * n: "5", * a: true, * b: true, * c: true, * beep: "boop", * deno: { land: true, com: true } * }, * literal: [ "--cliffy" ], * unknown: [ "foo", "bar", "baz" ], * stopEarly: false, * stopOnUnknown: false * } * ``` */ export declare function parseFlags, TFlagOptions extends FlagOptions, TFlagsResult extends ParseFlagsContext>(argsOrCtx: string[] | TFlagsResult, opts?: ParseFlagsOptions): TFlagsResult & ParseFlagsContext;