Type alias WithBasic

WithBasic: {
    deprecated?: string;
    desc?: string;
    group?: string;
    hide?: true;
    link?: URL;
    names?: ReadonlyArray<string | null>;
    preferredName?: string;
    styles?: OptionStyles;
}

Defines attributes common to all options.

Type declaration

  • Optional Readonly deprecated?: string

    The option deprecation notice. It may contain inline styles.

  • Optional Readonly desc?: string

    The option synopsis. It may contain inline styles.

  • Optional Readonly group?: string

    The option group in the help message.

  • Optional Readonly hide?: true

    True if the option should be hidden from the help message.

  • Optional Readonly link?: URL

    A reference to an external resource.

  • Optional Readonly names?: ReadonlyArray<string | null>

    The option names, as they appear on the command-line (e.g. -h or --help).

    Names cannot contain whitespace or the equals sign = (since it may act as option-parameter separator). Empty names or nulls can be specified in order to skip the respective "slot" in the help message names column.

  • Optional preferredName?: string

    A name to be displayed in error and help messages in cases where one is not available (e.g., when evaluating option requirements or processing positional arguments). It is not validated and can be anything.

    If not specified, the first name in the WithBasic.names array will be used.

  • Optional Readonly styles?: OptionStyles

    The option display styles.