UNPKG

@jil/args

Version:

A convention based argument parsing and formatting library, with strict validation checks

8 lines (7 loc) 457 B
import { ArgList, Arguments, Argv, ContextFactory, PrimitiveType } from './types'; /** * Parse a list of command line arguments (typically from `process.argv`) into an arguments * object using a context factory. The factory can customize the parser options based on the * arguments being parsed. */ export declare function parseInContext<O extends object = {}, P extends PrimitiveType[] = ArgList>(argv: Argv, context: ContextFactory): Arguments<O, P>;