/** * @fileoverview Manual argv parser. * * Commander renders help/version, but the dynamic `txv * [input] [tool-options]` grammar with passthrough tool options is easier to * keep deterministic and fully tested with a small dedicated parser. */ /** Strongly typed global options parsed from argv. */ export interface GlobalOptions { readonly input?: string; readonly file?: string; readonly files?: string; readonly stdin?: boolean; readonly out?: string; readonly outDir?: string; readonly write?: boolean; readonly dryRun?: boolean; readonly backup?: boolean; readonly encoding?: string; readonly json?: boolean; readonly ndjson?: boolean; readonly quiet?: boolean; readonly noColor?: boolean; readonly explain?: boolean; readonly config?: string; readonly allowNetwork?: boolean; readonly unsafe?: boolean; readonly debug?: boolean; } /** Parsed result of the full argv. */ export interface ParsedArgs { readonly globals: GlobalOptions; readonly positionals: readonly string[]; readonly toolOptions: Readonly>; } /** * Parses argv into globals, positionals, and passthrough tool options. * * Value options consume the next token as their value. Unknown options are * collected into `toolOptions`: `--opt=value` becomes a string, a bare `--opt` * followed by a non-flag token becomes a string, otherwise a boolean. */ export declare function parseArgs(argv: readonly string[]): ParsedArgs; //# sourceMappingURL=argv.d.ts.map