tsargp
    Preparing search index...

    Type Alias WithArgumentInfo

    Information about the current argument sequence in the parsing loop.

    type WithArgumentInfo = {
        index: number;
        name: string;
        position: number;
        values: OpaqueOptionValues;
    }
    Index

    Properties

    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 environment data.

    Note that the actual command line may change due to parsing. More specifically, cluster arguments are canonicalized and positional marker(s) are removed.

    name: string

    The option name. Can be either of:

    • the name supplied on the command-line;
    • the preferred name, if the sequence comes from positional arguments;
    • a data source, if the sequence comes from the environment;
    • '0', if the sequence comes from the standard input.
    position: number

    The sequence number relative to positional arguments (1-based). It will be NaN if the sequence is not positional.

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