aboutsummaryrefslogtreecommitdiff
path: root/src/lib.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib.ts')
-rw-r--r--src/lib.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib.ts b/src/lib.ts
index ed46ea5..fcec19c 100644
--- a/src/lib.ts
+++ b/src/lib.ts
@@ -11,9 +11,11 @@
export class TolNode {
name: string;
children: TolNode[];
- constructor(name: string, children: TolNode[] = []){
+ parent: TolNode | null;
+ constructor(name: string, children: TolNode[] = [], parent = null){
this.name = name;
this.children = children;
+ this.parent = parent;
}
}
// Represents a node/tree, and holds layout data for a TolNode node/tree