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

    Describes the type characteristics of a function parameter or return value.

    At least one of scalar, range, or context must be defined.

    interface ValueTypeJSON {
        arrayDepth?: number;
        description?: string;
        lambda?: ScalarType | "*" | "raw";
        lambdaArity?: number;
        range?: "*" | "p" | "r" | "m";
        scalar?: string;
    }

    Hierarchy (View Summary)

    Index
    arrayDepth?: number

    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.
    • 3: Array of arrays of arrays (e.g. for 3D ranges or arrays of tables)

    0 if no range is defined, otherwise 1.

    description?: string

    A short description of the value's purpose or expected usage.

    lambda?: ScalarType | "*" | "raw"

    Indicates that the value is a lambda function, and what the lambda RETURNS — which is also what the marshalled callable coerces each result to:

    • a ScalarType: that scalar.
    • *: any SCALAR — each result still coerces to ONE scalar (a 1×1 range/reference unwraps, an error embeds as a value, a larger shape is #CALC! for the whole call).
    • raw: a declared any return (Lambda<Args, any>) — results pass to the body uncoerced. REDUCE is the case: its accumulator threads raw, which is what makes an array/reference accumulator legal.

    If specified, the function supports lambda inputs.

    lambdaArity?: number

    The lambda's declared parameter count, from the Lambda<Args, R> tuple.

    Enforced by the marshaller at the call — a callable that cannot take exactly this many arguments is #VALUE! for the whole call, before any element runs (an eta-reduced function name defers to its own dispatch). Absent when the declaration leaves arity open (Lambda<any[], R>): a lambda slot in a repeating group then requires one parameter per OTHER argument of the call; anywhere else the arity is unchecked.

    range?: "*" | "p" | "r" | "m"

    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.
    • *: Any value — a scalar or a range. Declared any, and the same *-means-any spelling as scalar and lambda.

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

    A * parameter is handed the whole argument, whatever it is. It is a VALUE position rather than a range one, which matters when another parameter causes the call to broadcast: a * parameter follows that broadcast and receives one element per position, where an r/p parameter would receive the whole range on every call. It never causes a broadcast itself.

    IF(logical, valueIfTrue, valueIfFalse) is the canonical shape — the branches are *, so a single condition returns the chosen branch untouched while an array condition selects element by element.

    scalar?: string

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

    This corresponds to a ScalarType such as Number, Boolean, or String. ScalarType.Null is permitted only for event handler return types.