(serialized_args: string[]): string serialized_args
string[]returns
string 6 declarations
(serialized_args: string[]): string serialized_argsstring[]string (command: string, raw_rest_args?: string[] | undefined, cache?: Record<string, Args | undefined>): Args Parses process.argv for the specified command, so given
gro taskname arg1 --arg2 -- eslint eslintarg1 --eslintarg2 -- tsc --tscarg1 --tscarg2
the command 'eslint' returns eslintarg1 --eslintarg2
and 'tsc' returns --tscarg1 and --tscarg2.
commandstringraw_rest_args?string[] | undefinedcacheRecord<string, Args | undefined>to_forwarded_args_by_command(raw_rest_args)Args (raw_rest_args?: string[]): Record<string, Args | undefined> raw_rest_argsstring[]to_raw_rest_args()Record<string, Args | undefined> (command_to_strip?: string | undefined, raw_rest_args?: string[]): Args Gets all args after the first -- without assuming a command name.
This is useful for tasks that want to forward args directly to a tool
without requiring users to specify the tool name explicitly.
Optionally strips a specific command name if present for backward compatibility.
command_to_strip?string | undefinedraw_rest_argsstring[]to_raw_rest_args()Args // `gro test -- --watch` → {watch: true}
// `gro test -- foo.test.ts` → {_: ['foo.test.ts']}
// `gro test -- vitest --watch` with command_to_strip='vitest' → {watch: true}
to_implicit_forwarded_args('vitest')(argv?: string[]): string[] Gets the array of raw string args starting with the first --, if any.
argvstring[]process.argvstring[] (argv?: string[]): { task_name: string; args: Args; } Parses task_name and args from process.argv,
ignoring anything after any --.
argvstring[]process.argv{ task_name: string; args: Args; }