Type alias WithFunction

WithFunction: {
    break?: true;
    exec?: FunctionCallback;
    paramCount?: number | Range;
    skipCount?: number;
}

Defines attributes for the function option.

Type declaration

  • Optional Readonly break?: true

    True to break the parsing loop.

  • Optional Readonly exec?: FunctionCallback

    The function's callback.

  • Optional Readonly paramCount?: number | Range

    The function's parameter count.

    If negative, then the option accepts unlimited parameters. If non-negative, then the option expects exactly this number of parameters. If a range, then the option expects between min and max parameters.

  • Optional skipCount?: number

    The number of remaining arguments to skip. You may change this value inside the callback. The parser does not alter this value.