Returns a formula instance if calculations are available.
Optionalcoords: CellCoords | nullDefers evaluation of the current value so it can be processed in a batched call to ICondition.IOperator.doBatch.
Optionalkey: any
A grouping key used to batch or deduplicate values. The key can be any value; typical choices are:
This method is intended for advanced operators that want to:
When a predicate calls ctx.deferBatch(key):
doBatch once with the collected
values and uses its boolean results as the actual condition outcomes.Rules that do not use batching can ignore this API entirely.
Error
Throws if deferBatch is called but the active operator does not implement
ICondition.IOperator.doBatch. This protects against accidentally
deferring work for a operator that has no batch handler.
Returns a date from an SerialDate value. This is used for date calculations.
A serialized date as a number.
Splits a serial date into its calendar and clock fields, without constructing a Date.
The serial date to split.
OptionalreuseParts: boolean | ParsedDateTime
Avoids allocating a fresh ParsedDateTime:
true: the fields are written into a shared scratch object and returned — for a
one-off caller that just wants to avoid the allocation without owning a buffer itself.
The result must be consumed immediately (read a field, done).Prefer this to fromSerialDate for calendar-field comparisons (year/month/day/…) —
it skips the Date allocation entirely, not just the reuse of one.
The text the current cell shows, under a filter; null elsewhere.
Read by an operator asked to match displayed text (InSetOption.byDisplay): a cell
holding 1.5 and showing 1.50 is the item 1.50. A conditional format or a data
validation has no displayed text, so this answers null there and the operator compares
the value.
Formatted on demand, so an operator that never asks pays nothing.
Gets now as a serial number.
Return the current location in the sheet.
Return the range for the condition.
Returns the raw cell type for the current cell being evaluated.
Resolves a condition input to a fully-built ICondition instance.
A resolved ICondition ready for evaluation, or null if the input could not be resolved
For Combinator Authors:
Why This Exists:
Returns an SerialDate value from a date. This is used for date calculations.
A date as a javascript object.
Convert the value to the specified scalar type.
Declares that this condition depends on formula, and resolves to its values across
getCoords.
The formula this operator needs — the param's ICalculation.IFormula, or formula text as authored.
One value per cell of getCoords, read with LOCAL coordinates
(getValueAt(0, 0) is the coords' top-left), or null when there is no engine to
answer with. Already-delivered values come back without awaiting anything.
The ONLY way an operator should reach a formula. Await it in createPredicate — which is
itself awaited — and the predicate that comes out is a plain synchronous read of the values.
No operator needs to compile, evaluate, or batch anything.
What happens behind it depends on who is asking, and an operator neither knows nor cares:
Range.filter()) has no lifetime to keep fresh, so it simply evaluates
once and resolves. Correct there, and identical from here.
The context provided to condition predicates during evaluation.
Remarks
Includes information about the current cell being evaluated, the range, and utility methods for value transformation and formula resolution.