Type alias ParseInfo<P>

ParseInfo<P>: {
    index: number;
    name: string;
    param: P;
    values: OpaqueOptionValues;
}

Information about the current argument sequence in the parsing loop.

Type Parameters

  • P

    The parameter data type

Type declaration

  • index: number

    The index of the occurrence of the option name, or of the first option parameter. It will be NaN if the sequence comes from an environment variable.

  • name: string

    The option name as specified on the command-line, or the environment variable name. It will be the option's preferred name if the sequence comes from positional arguments.

  • param: P

    The option parameter(s), or the parameters preceding the word being completed, if any.

  • values: OpaqueOptionValues

    The previously parsed values. It is an opaque type that should be cast to OptionValues<typeof your_options>.