Skip to content

API reference / Common / Engine types / TableOutcome

Type Alias: TableOutcome ​

ts
type TableOutcome = 
  | {
  rowsInserted: {
     ids: TableRowId[];
  };
}
  | {
  rowsDeleted: {
     ids: TableRowId[];
  };
}
  | {
  rowPropertiesUpdated: {
     ids: TableRowId[];
  };
}
  | {
  columnsInserted: {
     ids: TableColumnId[];
  };
}
  | {
  columnsDeleted: {
     ids: TableColumnId[];
  };
}
  | {
  columnPropertiesUpdated: {
     ids: TableColumnId[];
  };
}
  | {
  cellsReplaced: {
     cells: TableCellRef[];
  };
}
  | {
  cellMergesUpdated: {
     cells: TableCellRef[];
  };
}
  | {
  cellPropertiesUpdated: {
     cells: TableCellRef[];
  };
}
  | "tablePropertiesUpdated"
  | {
  revisionsSettled: {
     ids: RawId[];
  };
}
  | {
  cellTextEdited: {
     cell: TableCellRef;
     outcome: TextOutcome;
  };
};

What a TableCommand did to a table — the command's twin of the engine facet's TableChange, one level up: a fact about the table, never a selection.

Rows and columns are named by id, a cell by the [TableCellRef] that is its identity, and only those the table still held: a target a peer deleted first is not listed. A variant names what happened, not which command ran: a set and a patch of a cell's properties are both CellPropertiesUpdated.