Low-level Store transaction. epoch provides optional optimistic
concurrency at the storage boundary.
Calling Store.applyTransaction bypasses Grid read-only checks and Grid
undo/redo history. Host-driven edits should use Grid.applyTransaction.
- Package
@sheetwrite/core
- Source
packages/core/src/types/transaction.ts#L27
Members 2
patches Ordered document operations submitted as one store commit.
patches: DocumentOptype 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
}type 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
}type DocumentOp =
| {
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 →[];
epoch Expected current store epoch; a mismatch returns a conflict without applying patches.
Declaration
View full TypeScript declaration
export interface Transaction {
patches: DocumentOptype 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
}type 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
}type DocumentOp =
| {
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 →[];