From bd935043148c5582b357e916fa7ddfe5b8a00b24 Mon Sep 17 00:00:00 2001 From: Evan Simkowitz Date: Mon, 17 Jun 2024 14:18:27 -0700 Subject: [PATCH] Add comments for swapNode --- frontend/faraday/lib/model.ts | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/frontend/faraday/lib/model.ts b/frontend/faraday/lib/model.ts index 049d2ca91..137f4cecc 100644 --- a/frontend/faraday/lib/model.ts +++ b/frontend/faraday/lib/model.ts @@ -73,10 +73,21 @@ export interface LayoutTreeMoveNodeAction extends LayoutTreeAction, MoveOpera type: LayoutTreeActionType.Move; } +/** + * Action for swapping two nodes within the layout tree. + * + * @template T The type of data associated with the nodes of the tree. + */ export interface LayoutTreeSwapNodeAction extends LayoutTreeAction { type: LayoutTreeActionType.Swap; + /** + * The node that node2 will replace. + */ node1: LayoutNode; + /** + * The node that node1 will replace. + */ node2: LayoutNode; }