0

I have an application which can be invoked from console and programmatically as well. I have defined my command line arguments using yargs. How do I set the same args programmatically? and use their default values, incase they are not passed?

The way I am describing my options right now looks like this -

export const optionDefinitions = yargs
    .option("inf", {
        type: String,
        description: "abc",
        alias: "i",
        default: "local",
    }).    
    .help("help")
    .alias("h", "help")
    .argv
Mahima
  • 178
  • 8

0 Answers0