import { ScalarValue } from "@zouloux/ecma-core"; /** * TODO : Manage flags without equal * TODO : - "--port 3000" should work as well as "--port=3000" * TODO : - For now it will enable "--port" as true and add an argument of value "3000" * * TODO : Manage concat shortcuts correctly * TODO : - "-abc" should enable "-a" "-b" and "-c" * TODO : - For now its detected as "abc" to be true */ export declare type TFlagValue = ScalarValue | (ScalarValue[]); interface IParseArgumentsOptions { /** * Alias flags * { * p: 'port' * } * Flag "-p" will be aliased to "--port" */ flagAliases: Record; /** * Arguments to parse. Defaults to process.argv */ argv: string[]; /** * Default flag values. */ defaultFlags: Record; } export interface IParsedArguments { platform: string; script: string; flags: Record; arguments: string[]; } /** * Will convert process.argv to a list of argument and flags with correct type. * Here are IParsedArguments named values : * `platform ./script.js -f --flag argument1 argument2 --otherFlag=false --array=1 --array=2` * @see IParseArgumentsOptions * @see IParsedArguments * TODO : Better doc */ export declare function parseArguments(options?: Partial): IParsedArguments; export {};