1313 */
1414
1515import type { Undoable , UndoableSnapshot } from "./Undoable" ;
16- import type { UndoHistoryBase } from "./UndoHistoryBase " ;
16+ import type { LinearHistoryBase } from "./LinearHistoryBase " ;
1717import type { Observable } from "rxjs" ;
1818
1919/**
20- * The interface for nodes in a tree-based history.
20+ * The type that defines the concept of a node stored in a tree-based history.
2121 * @category API History
2222 */
2323export interface UndoableTreeNode {
2424 /**
25- * Among the children of the node, iidentifies the one that was undone recently.
25+ * Among the children of the node, identifies the one that was undone recently.
2626 */
2727 lastChildUndone : UndoableTreeNode | undefined ;
2828
@@ -73,7 +73,7 @@ export interface UndoableTreeNodeDTO {
7373 readonly id : number ;
7474
7575 /**
76- * The undoable object contained in the node, in an unkown format as
76+ * The undoable object contained in the node, in an unknown format as
7777 * the format is defined by the developer while exporting the history.
7878 */
7979 readonly undoable : unknown ;
@@ -101,13 +101,13 @@ export interface TreeUndoHistoryDTO {
101101}
102102
103103/**
104- * Tree -based undo history.
105- * On adding undoables after an undo operation, the redoable objects are no more flush but
106- * kept in the history as a granch of the graph.
104+ * The type that defines the concept of a tree -based history.
105+ * On adding undoable objects after a history operation, the redoable objects are no more flush but
106+ * kept in the history as a branch of the graph.
107107 * Useful for exploration.
108108 * @category API History
109109 */
110- export abstract class TreeUndoHistory implements UndoHistoryBase {
110+ export abstract class TreeHistory implements LinearHistoryBase {
111111 /**
112112 * States whether the path of kept. If kept, users cannot delete
113113 * nodes.
@@ -134,7 +134,7 @@ export abstract class TreeUndoHistory implements UndoHistoryBase {
134134
135135 /**
136136 * The current node. As the history is a tree in which one can navigate using
137- * undo , redo, gotTo, this current node refers to the node
137+ * history , redo, gotTo, this current node refers to the node
138138 * where the system state is.
139139 */
140140 public abstract get currentNode ( ) : UndoableTreeNode ;
@@ -212,7 +212,7 @@ export abstract class TreeUndoHistory implements UndoHistoryBase {
212212 /**
213213 * Imports the given DTO history. Flushes the current history.
214214 * @param dtoHistory - The DTO history to import.
215- * @param fn - The convertion fonction that transforms undoable DTO (of nodes) into Undoable.
215+ * @param fn - The transformation function that transforms undoable DTO (of nodes) into Undoable.
216216 */
217217 public abstract import ( dtoHistory : TreeUndoHistoryDTO , fn : ( dtoUndoable : unknown ) => Undoable ) : void ;
218218
0 commit comments