summaryrefslogtreecommitdiff
path: root/apps/web/src/lib/commands/timeline/tracks-snapshot.ts
diff options
context:
space:
mode:
authorMaze Winther <mazewinther@gmail.com>2026-04-03 03:13:49 +0200
committerMaze Winther <mazewinther@gmail.com>2026-04-03 03:13:49 +0200
commit1a8a1e889ab313e88fb0bbe6483c001ac751e2d8 (patch)
treeb275216880f2592c97bbbd3eb1eab8074cb6fd93 /apps/web/src/lib/commands/timeline/tracks-snapshot.ts
parent3516bd69f4aaf5be401d3e03cb45d2e5bbc28638 (diff)
downloadopencut-1a8a1e889ab313e88fb0bbe6483c001ac751e2d8.tar.gz
refactor: update command execute methods to return CommandResult | undefined
Diffstat (limited to 'apps/web/src/lib/commands/timeline/tracks-snapshot.ts')
-rw-r--r--apps/web/src/lib/commands/timeline/tracks-snapshot.ts41
1 files changed, 21 insertions, 20 deletions
diff --git a/apps/web/src/lib/commands/timeline/tracks-snapshot.ts b/apps/web/src/lib/commands/timeline/tracks-snapshot.ts
index d397431c..2493f19b 100644
--- a/apps/web/src/lib/commands/timeline/tracks-snapshot.ts
+++ b/apps/web/src/lib/commands/timeline/tracks-snapshot.ts
@@ -1,20 +1,21 @@
-import { Command } from "@/lib/commands/base-command";
-import type { TimelineTrack } from "@/lib/timeline";
-import { EditorCore } from "@/core";
-
-export class TracksSnapshotCommand extends Command {
- constructor(
- private before: TimelineTrack[],
- private after: TimelineTrack[],
- ) {
- super();
- }
-
- execute(): void {
- EditorCore.getInstance().timeline.updateTracks(this.after);
- }
-
- undo(): void {
- EditorCore.getInstance().timeline.updateTracks(this.before);
- }
-}
+import { Command, type CommandResult } from "@/lib/commands/base-command";
+import type { TimelineTrack } from "@/lib/timeline";
+import { EditorCore } from "@/core";
+
+export class TracksSnapshotCommand extends Command {
+ constructor(
+ private before: TimelineTrack[],
+ private after: TimelineTrack[],
+ ) {
+ super();
+ }
+
+ execute(): CommandResult | undefined {
+ EditorCore.getInstance().timeline.updateTracks(this.after);
+ return undefined;
+ }
+
+ undo(): void {
+ EditorCore.getInstance().timeline.updateTracks(this.before);
+ }
+}