import {RBColor} from './rbColor' export class RBNode { item: T color: RBColor parent: RBNode left: RBNode right: RBNode constructor(color: RBColor, item?: T, parent?: RBNode, left?: RBNode, right?: RBNode) { this.color = color if (item !== undefined) this.item = item if (parent !== undefined) this.parent = parent if (left !== undefined) this.left = left if (right !== undefined) this.right = right } toString(): string { return this.item.toString() } }