Type Alias WithParam<I>

WithParam: {
    complete?: CompletionCallback<I>;
    example?: KnownValue;
    inline?: false | "always";
    paramName?: string;
    positional?: true | string;
}

Defines attributes for options that may have parameters.

Type Parameters

  • I

    The type of argument information for completion callbacks

Type declaration

  • Optional Readonlycomplete?: CompletionCallback<I>

    A custom callback for word completion.

  • Optional Readonlyexample?: KnownValue

    The option example value. Replaces the option type in the help message parameter column.

  • Optional Readonlyinline?: false | "always"

    Whether inline parameters should be disallowed or required for this option.

  • Optional ReadonlyparamName?: string

    The option parameter name. Replaces the option type in the help message parameter column. It should not contain inline styles or line feeds.

  • Optional Readonlypositional?: true | string

    Whether the option accepts positional arguments. There may be at most one option with this setting.

    If set, then any argument not recognized as an option name will be considered positional. Additionally, if a string is specified as positional marker, then all arguments beyond this marker will be considered positional.

    We recommend also setting WithBasic.preferredName to some explanatory name.