Interface FlagOptions<T>

Type Parameters

  • T

Hierarchy

  • FlagOptions

Properties

default: T

Default value when no flag is specified

isValid?: ((v: T) => boolean)

Type declaration

    • (v: T): boolean
    • Optional parameter validation function

      Remarks

      If values is set at the same time, isValid will be called for verification when the values do not match, and if the values match, the value will be considered valid and will not call isValid

      Parameters

      • v: T

      Returns boolean

name: string

flag long name

short?: string

Optional flag short name

usage?: string

Optional flag usage description

values?: T[]

An optional list of valid values for the flag

Remarks

If isValid is set at the same time, isValid will be called for verification when the values do not match, and if the values match, the value will be considered valid and will not call isValid

Generated using TypeDoc