Options
All
  • Public
  • Public/Protected
  • All
Menu

Class CCliJsonArgGroup<Optional>

any-valued command-line argument group that JSON.parse's

For example, suppose our CLI has a CCliJsonArgGroup for its positionalArgGroup. Here's how that behaves:

$ cli '{"foo":true}' // named value receives object `{ foo: true }`
$ cli                // usage error
$ cli '""' '""'      // usage error
$ cli foo            // error parsing JSON

Type parameters

  • Optional: boolean

Hierarchy

Index

Constructors

Protected constructor

Properties

Protected options

options: CCliArgGroupOptions<Optional>

Accessors

description

hidden

  • get hidden(): boolean

optional

  • get optional(): boolean

placeholder

  • get placeholder(): string

Methods

_suggest

  • _suggest(_args: string[], _search?: undefined | string): string[]

Protected assertOneOrMoreArgs

  • assertOneOrMoreArgs(args: unknown[]): void

Protected assertSingleArg

  • assertSingleArg(args: unknown[]): void

parse

undefinedAsValue

Static create

Generated using TypeDoc and MonoLisa