@odoo/o-spreadsheet
Version:
A spreadsheet component
19 lines (18 loc) • 675 B
TypeScript
import { Transformation } from "../types/history";
import { UID } from "../types/misc";
/**
* An Operation can be executed to change a data structure from state A
* to state B.
* It should hold the necessary data used to perform this transition.
* It should be possible to revert the changes made by this operation.
*
* In the context of o-spreadsheet, the data from an operation would
* be a revision (the commands are used to execute it, the `changes` are used
* to revert it).
*/
export declare class Operation<T> {
readonly id: UID;
readonly data: T;
constructor(id: UID, data: T);
transformed(transformation: Transformation<T>): Operation<T>;
}