(value: T)
| 7 | } |
| 8 | |
| 9 | delete(value: T): boolean { |
| 10 | const index = this.children.indexOf(value) |
| 11 | if (index === -1) return false |
| 12 | this.children = this.children.slice(0, index).concat(this.children.slice(index + 1)) |
| 13 | if (this.children.length === 0) { |
| 14 | this.parent.delete(this) |
| 15 | } |
| 16 | return true |
| 17 | } |
| 18 | |
| 19 | add(value: T): Leaf<T> { |
| 20 | this.children.push(value) |
no outgoing calls
no test coverage detected