export class TreeNode < T extends ITreeNodeObject > { parent : T ; node : T ; children : TreeNode < T > [ ] = [ ] ; constructor ( node , name , parent ) { this . parent = parent ; this . node = node ; this . node . name = name ; } } export interface ITreeNodeObject { id : string ; name : string ; }