aboutsummaryrefslogtreecommitdiff
path: root/src/tol.ts
blob: 41ace2c538281f00e6efe7c5a5885a6867296c5e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
/*
 * Provides classes for representing and working with tree-of-life data.
 */
 
// Maps tree-of-life node names to node objects
export type TolMap = Map<string, TolNode>;
// Represents a tree-of-life node
export class TolNode {
	children: string[];
	parent: string | null;
	tips: number;
	pSupport: boolean;
	imgName: null | string;
	commonName: null | string;
	constructor(children: string[] = [], parent = null, tips = 0, pSupport = false){
		this.children = children;
		this.parent = parent;
		this.tips = tips;
		this.pSupport = pSupport;
		this.imgName = null;
		this.commonName = null;
	}
}