export declare namespace OptionParser { type MismatchCallback = (type: string) => void; type ParseFunction = (value: any, report: MismatchCallback) => T; type ParsedOptions>> = { [K in keyof T]: ReturnType; }; interface ParseConfig { validate?: boolean; context: string; exhaustive?: boolean; } function parse>>(options: Record | undefined, specs: T, config: ParseConfig): ParsedOptions; namespace Transform { function withDefault(parseFn: ParseFunction, defaultValue: T): ParseFunction; function noDefault(parseFn: ParseFunction): ParseFunction; function map | undefined, U, V>(parseFn: ParseFunction, cb: (item: U) => V): ParseFunction<{ -readonly [K in keyof T]: V; }>; function transform(parseFn: ParseFunction, cb: (value: T) => U): ParseFunction; } namespace Factory { type PrimitiveName = 'string' | 'number' | 'boolean'; type PrimitiveMap = T extends 'string' ? string : T extends 'number' ? number : boolean; export function parsePrimitive(...types: T): ParseFunction | undefined>; export function parsePrimitiveOrArray(type: T): ParseFunction> | undefined>; export {}; } }