import { Describe, Command, } from "../internal"; export abstract class Operation { protected _command: Command; abstract apply(resource: T): void; abstract clone(): Operation; abstract toJSON(): Operation.Serialize; public getCommand(): Command { return this._command; } public setCommand(command: Command): void { this._command = command; } public replaceOperations(...operations: Operation[]) { const command = this._command; if (command) { command.replaceOperations(this, operations); } } } export namespace Operation { export interface Serialize extends Describe {} }