(transformation: Transformation)
| 295 | }; |
| 296 | |
| 297 | export function stringify(transformation: Transformation): string { |
| 298 | if (transformation.type === 'replayRecordedState') { |
| 299 | return `Replay: ${transformation.recordedState.actionsRun |
| 300 | .map((x) => x.keysPressed.join('')) |
| 301 | .join('')}`; |
| 302 | } else { |
| 303 | return JSON.stringify(transformation); |
| 304 | } |
| 305 | } |