Incrementally validate the operation count and exact encoded payload size
without constructing a JSON string. Compact operation ranges are measured by
their serialized fields; their logical cell area is deliberately irrelevant.
Package
@sheetwrite/core
Source
packages/core/src/document-protocol.ts#L68
Declaration
functionvalidateTransactionResources(
operations:readonlyDocumentOptype DocumentOp =
| {
op: "set";
addr: CellAddress;
value: CellValue;
style?: CellStyle;
}
| { op: "setRange"; range: Range; cells: SnapshotCell[] }
| { op: "setBlock"; range: Range; block: PackedCellBlock }
| {
op: "setRangeStyle";
range: Range;
style: Partial<CellStyle> | null;
}
| {
// … 78 more lines — see the API reference
}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| { op:"setRange"; range:Range; cells:SnapshotCell[] }| { op:"setBlock"; range:Range; block:PackedCellBlock }| {op:"setRangeStyle";range:Range;style:Partial<CellStyle> |null;}| {// … 78 more lines — see the API reference}typeDocumentOp=| {op:"set";addr:CellAddress;value:CellValue;style?:CellStyle;}| {op:"setRange";range:Range;cells:SnapshotCell[];}| {op:"setBlock";range:Range;block:PackedCellBlock;}| {op:"setRangeStyle";// … 138 more lines — see the API reference}Exhaustive serializable operation union for workbook mutations.API reference →[],
limits?:Readonly<TransactionResourceLimitsinterface TransactionResourceLimits {
maxOperations: number;
maxEncodedBytes: number;
}interfaceTransactionResourceLimits {maxOperations:number;maxEncodedBytes:number;}interfaceTransactionResourceLimits {maxOperations:number;maxEncodedBytes:number;}Public ceilings shared by transaction producers, persistence, transport, and replay. Limits measure the submitted operation array itself, not the logical cell area covered by compact operations.API reference →>,