UNPKG

@seriousme/opifex

Version:

MQTT client & server for Deno & NodeJS

28 lines 690 B
/** * Parsed arguments as key value */ export type Args = Record<string, any>; export type ArgsValue = string | number | boolean; type ArgOpts = { string?: string[]; boolean?: string[]; alias?: Record<string, string>; default?: Args; }; /** * a parser for command line arguments * @param args the arguments to parse * @param opts the options for the parser * @returns the parsed arguments * * @example * const args = parseArgs(args, { * alias: { h: "help" }, * boolean: ["help"], * string: ["port"], * default: { port: 3000 }, * }); */ export declare function parseArgs(args: string[], opts?: ArgOpts): Args; export {}; //# sourceMappingURL=args.d.ts.map