Skip to content

Add option shorthand for conflicts / implies #751

@vseventer

Description

@vseventer

To my surprise, implies (and, coming in the next release, conflicts) are not available as option shorthand. Adding this would enable:

yargs.option('foo', {
  type: 'boolean',
  implies: 'bar',
  conflicts: 'baz'
});

// Same as:

yargs
  .boolean('foo')
  .implies('foo', 'bar')
  .conflicts('foo', 'baz');

Please let me know what you think. I'd be more than happy to submit a PR for this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions