(id: string)
| 151 | } |
| 152 | |
| 153 | getNodeById(id: string): TreeNode { |
| 154 | if (this.getId() === id) { |
| 155 | return this; |
| 156 | } |
| 157 | for (let i = 0, children = this.children, len = children.length; i < len; i++) { |
| 158 | const res = children[i].getNodeById(id); |
| 159 | if (res) { |
| 160 | return res; |
| 161 | } |
| 162 | } |
| 163 | } |
| 164 | |
| 165 | contains(node: TreeNode): boolean { |
| 166 | if (node === this) { |
nothing calls this directly
no test coverage detected