Class: DeleteNodeCommand\<TRow\>
Defined in: src/tree-editor/commands/delete-node.ts:13
Removes a node and its entire subtree. The command captures the deleted subtree and the node’s position among its siblings so undo can restore the exact prior state.
Type Parameters
TRow
TRow
Implements
Command<TRow>
Constructors
Constructor
new DeleteNodeCommand<
TRow>(options):DeleteNodeCommand<TRow>
Defined in: src/tree-editor/commands/delete-node.ts:25
Parameters
options
Returns
DeleteNodeCommand<TRow>
Properties
description
readonlydescription:string
Defined in: src/tree-editor/commands/delete-node.ts:15
Human-readable description for undo/redo UI.
Implementation of
type
readonlytype:"delete-node"='delete-node'
Defined in: src/tree-editor/commands/delete-node.ts:14
Unique command type identifier (e.g., ‘add-node’, ‘move-node’).
Implementation of
Methods
execute()
execute(
state):TreeState<TRow>
Defined in: src/tree-editor/commands/delete-node.ts:30
Apply the mutation. Returns the new tree state.
Parameters
state
TreeState<TRow>
Returns
TreeState<TRow>
Implementation of
undo()
undo(
state):TreeState<TRow>
Defined in: src/tree-editor/commands/delete-node.ts:73
Reverse the mutation. Returns the previous tree state.
Parameters
state
TreeState<TRow>
Returns
TreeState<TRow>