SheetXL - v0.8.0-beta.9+sites.210.e2d420901
    Preparing search index...

    Interface IParameterType

    Describes the parameter to a function, including its name, type, whether it's required, and if it's a rest parameter.

    interface IParameterType {
        getArrayDepth(): number;
        getDefaultValue(): Scalar | undefined;
        getEnum(): IEnum | null;
        getLambda(): ScalarType | "*" | "raw" | null;
        getName(): string;
        getRangeType(): "*" | "p" | "r" | "m" | null;
        getRepeatingTypes(): readonly IParameterType[] | null;
        getScalarType(): ScalarType | "*" | null;
        isAcceptError(): boolean;
        isLazy(): boolean;
        isNoFilter(): boolean;
        isNoLift(): boolean;
        isOptional(): boolean;
        isRest(): boolean;
        isValueOrRange(): boolean;
    }

    Hierarchy (View Summary)

    Index
    • Defines the number of array signatures after a parameter.

      • 0: No array signature. The value is scalar or a single cell.
      • 1: Will flatten.
      • 2: Nest.

      Returns number

    • The value the parameter's own initializer supplies when the argument is ABSENT, or undefined where none can be read.

      Returns Scalar | undefined

    • The enum the parameter is limited to, or null when it takes any value of its type.

      Returns IEnum | null

      Declared by typing the parameter as a TypeScript enum, as an alias paired with a same-name as const object, or as a union of number or string literals (0 | 1).

      IEnum

    • Indicates that the value is a LAMBDA (a function value), and what it produces — which is also what the marshalled callable coerces each result to.

      • '*': any SCALAR — each result coerces to one scalar.
      • a ScalarType: the lambda's declared return.
      • 'raw': a declared any return — results pass uncoerced (REDUCE's accumulator).
      • null: not a lambda.

      Returns ScalarType | "*" | "raw" | null

      A lambda is neither a value nor a location, so this is the accessor to ask before concluding anything from getScalarType — which reports 'l' alongside a lambda for historical reasons, a spelling outside its own declared ScalarType | '*' | null.

      Applies to both parameters (BYROW's fn) and the one return that is a lambda (LAMBDA).

    • The name of the parameter.

      Returns string

    • Indicates that the value is a range (multi-cell) structure.

      • p: A RangeReference, representing a pointer to sheet coordinates.
      • r: A Range, representing the actual values in the range.
      • m: A materialized array (Scalar[] or Scalar[][]) that has been extracted from the range.

      If specified, the function supports multi-cell or structured range inputs.

      Returns "*" | "p" | "r" | "m" | null

    • The SLOTS of a repeating parameter group, or null when this parameter is not one.

      Returns readonly IParameterType[] | null

      A repeating group is one declared parameter whose arguments arrive as a fixed-size cycle repeated N times — SUMIFS(sum, r1, c1, r2, c2, …) is a [criteriaRange, criteria] group. The returned array IS the cycle, so getRepeatingTypes()!.length is the period and argument i binds to slot (i − prefixLength) % period.

      This is a NESTED node rather than a flattened list on purpose: a flat list cannot be re-segmented, and every consumer (the site predicate, the arity check, the function wizard) needs the period to bind an argument position to a slot.

      A period-1 group carries a single slot with the same name as the parameter, which is what makes it display identically to a rest parameter (array1, array2, …).

      Only the LAST slot may be optional, and it means one thing: it may be omitted when there is exactly one repetition (SORTBY(array, by1) is legal; SORTBY(array, by1, o1, by2) is not).

    • Indicates that the value is a single, scalar cell-compatible value.

      Returns ScalarType | "*" | null

      This corresponds to a ScalarType such as Number, Boolean, or String. '*' is a scalar of undeclared type — still provably a scalar, unlike untyped. ScalarType.Null is permitted only for event handler return types.

    • True when a BARE error at this parameter — an error instead of a value or a range, NA(), #NAME?, a union where one rectangle is needed — is delivered to the body RAW rather than propagated: the AcceptError<T> marker. A rule, not a type — the engine's auto-reject is off at this slot, and the body narrows with FormulaError.isError if it cares.

      Returns boolean

      The default, and the common case, is that the error propagates with its identity and the body never runs. The marker never looks INSIDE a container: an error member of a range reaches the body either way and is the body's to judge (IRange.firstError).

    • True when the argument at this parameter may reach the body UNEVALUATED, as an ILazy handle — the Lazy<T> marker.

      Returns boolean

    • True when the members reaching this repeating scalar parameter are coerced rather than filtered — the NoFilter<T> marker.

      Returns boolean

    • True when a multi-cell REFERENCE at this scalar parameter is #VALUE! rather than a broadcast — the NoLift<T> marker.

      Returns boolean

    • Indicates whether the parameter is required.

      Returns boolean

    • Indicates whether the parameter is a rest parameter (accepts multiple arguments).

      Returns boolean

      • A rest parameter can only be the last parameter in a function.
      • If rest is true, the parameter is also considered optional.

      A rest parameter is the degenerate repeating group: period 1, no minimum. Prefer getRepeatingTypes (Repeating<T>) when at least one argument is required.

    • True when the parameter takes EITHER a value or a range, decided per argument by its kind — an IRange | Scalar union.

      Returns boolean