MCPcopy Index your code
hub / github.com/simstudioai/sim / createOperationEntry

Function createOperationEntry

apps/sim/stores/undo-redo/utils.ts:18–25  ·  view source on GitHub ↗
(operation: Operation, inverse: Operation)

Source from the content-addressed store, hash-verified

16import type { BlockState } from '@/stores/workflows/workflow/types'
17
18export function createOperationEntry(operation: Operation, inverse: Operation): OperationEntry {
19 return {
20 id: generateId(),
21 operation,
22 inverse,
23 createdAt: Date.now(),
24 }
25}
26
27export function createInverseOperation(operation: Operation): Operation {
28 switch (operation.type) {

Callers 1

useUndoRedoFunction · 0.90

Calls 1

generateIdFunction · 0.90

Tested by

no test coverage detected