The one union type for cell values.
Column accessors return a Value. Built-in sort, filter, and aggregation
functions operate on Value. Custom sort and filter functions receive the
original row instead, so users are never forced through Value for their
own logic.
Null stands in for both JavaScript null and undefined. List is the
Elm counterpart of a JavaScript array cell value and exists so the array
filter functions (arrIncludes, arrIncludesAll, arrIncludesSome) and
the extent / unique aggregations can be expressed faithfully.
Coerce a value to a string the way JavaScript's String(x) does, except
that Null becomes the empty string (TanStack writes String(x ?? '') at
every call site that matters).
toString (Number 1) == "1"
toString (Number 1.5) == "1.5"
toString (Bool True) == "true"
toString Null == ""Coerce a value to a number the way JavaScript's Number(x) does.
toNumber (Number 29) == 29
toNumber (String "29") == 29
toNumber (String "") == 0
toNumber (Bool True) == 1
toNumber Null == 0A value that does not coerce, such as String "abc", gives NaN, which
compares False against everything just as it does in JavaScript. A Date
coerces to its millisecond timestamp and a one-element List coerces to its
element, both matching Number(x).
A cell value.