ReadonlyisFor runtime type checking.
ReadonlyisFor runtime type checking.
Add Listeners.
Optionaloptions: IListener.OptionsBatches all 'transactional' changes until they have all be committed or rolled back.
Optionaloptions: string | ITransaction.OperationOptions
Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.
Any changes that are made to this object will be reflected in the local record but not committed to the transactional store until the batch is popped.
Useful for operations that are longer running but generally not recommended as it keeps a transaction open. doBatch is the preferred option.
Close the record and cleans resources. Can't be undone.
OptionaldeleteProvides a mechanism to perform a set of operations in a batch.
A callback that performs multiple operations all within the same transaction.
Optionaloptions: string | ITransaction.OperationOptions
Description of the operation or additional options. Used for tracking undo/redo and history. Default Value User Operation.
A unique stable id.
OptionalgetA reference to a part of this item that the given coords designate exactly, or null.
The coords to match, sheet-qualified (scope) and in row-first order.
Optionalhome: CellCoords | null
The cell of the formula the reference is for, when there is one. A reference can be
written relative to it: Sales[@Amount] for a table cell in the formula's own row, and from
inside the table [@Amount] and [Amount].
Backs INamedCollection.getByRanges with includeParts. Some named things address
regions that are not themselves names: a table's column is written Sales[Amount], its header
row Sales[#Headers]. Those are structured references, not entries in the collection — there
is no INamed to return for one, which is why this returns text rather than an item.
Implemented by whatever owns the parts (a table), so the collection stays out of the business of knowing what kinds of items have insides.
OptionalgetReturn the ranges that are associated with the named item or null if no ranges are available.
ICalculation.INamedFormula redeclares it as required), so a caller holding one does not
need a guard. Optionality here is what lets a named thing that designates no cells exist at
all; it is not an invitation to reach for ?.() on a name.A string identifying the scope. This is normally a sheet name.
If null then this will be treated as a global scope.
Read-only — there is deliberately no setScope. Scope is half a name's identity, not a
property of it: it decides the symbol the definition compiles into, so Total and
Sheet1!Total are two names rather than one name in two states. Excel takes the same line —
its Name object has no scope property, the Name Manager greys the dropdown out when editing,
and assigning a prefixed string to .Name does not move a name (Excel re-applies the original
scope, turning One!Beta into One!One!Beta).
To change scope, delete the name and define it again in the new one — which is also what dependent formulas expect, since they re-resolve by name.
The underlying item that is being referenced.
Immutable
What T is depends on getType, and for the common case it is text. A defined name
(type 'formula') is an ICalculation.INamedFormula, so this is its refers-to
EXPRESSION as a string with no leading = — Sheet1!$B$4, or 0.21 for a name holding a
constant. A table's is the ITable. It is never the target: the string Sheet1!$B$4 is
what the name says, not the cells it designates and not what they contain.
The two questions this is mistaken for have their own calls:
null for a name holding an expression.ICalculation.IFormula.evaluate(), which every named
formula has. Returns a Scalar for a value name and an IRange for a reference one, so
there is no parse-the-text-and-re-query hop. Note that a name written with relative
references evaluates per calling CELL, so its one anchored answer is not the answer every
dependent sees.Every committed update gives the record a new, strictly increasing version id.
Used with getId to uniquely identify a version of the record.
The id is an identity, not a per-record count: ids are drawn from a single store-wide sequence bumped once per commit, so all records written in the same commit share an id and a given record's ids increase but are not sequential.
Records are immutable so a restore/revert doesn't change them — it repoints, and the version id reported is the one for the snapshot the store is currently at. Version ids are never reused: a write after an undo receives an id higher than any previously issued, so a stale reader can always detect the change.
Returns true if no more operations are allowed.
If the model unable to be modified.
If the model unable to be modified.
Selects the current item.
Optionaloptions: ITypes.SelectOptionsAn async INamed.
The comment for the defined name.
Optionaloptions: ITransaction.OperationOptionsOptionalsetIf true then the name is not visible.
Optionaloptions: ITransaction.OperationOptionsThis is the name that identifies the item.
The name.
Optionaloptions: ITransaction.OperationOptionsOptionalto
Defined names are descriptive texts that are used to represents a cell, range of cells, formula, or constant value.