@visulima/cerebro
Version:
A delightful toolkit for building cross-runtime CLIs for Node.js, Deno, and Bun.
10 lines (9 loc) • 699 B
TypeScript
import type { OptionDefinition, PossibleOptionDefinition } from "../../types/command.d.ts";
/**
* Removes boolean values from arguments to prevent commandLineArgs errors.
* commandLineArgs throws an error if we pass a value for a boolean arg as follows:
* myCommand -a=true --booleanArg=false --otherArg true
* This function removes these booleans to avoid errors from commandLineArgs.
*/
declare const removeBooleanValues: <OD extends OptionDefinition<any>>(arguments_: string[], options: PossibleOptionDefinition<OD>[], optionMapByName?: Map<string, PossibleOptionDefinition<OD>>, optionMapByAlias?: Map<string, PossibleOptionDefinition<OD>>) => string[];
export default removeBooleanValues;