(parentKey: Key | null, ...values: T[])
| 337 | this.insert(parentKey, 0, ...values); |
| 338 | }, |
| 339 | append(parentKey: Key | null, ...values: T[]) { |
| 340 | if (parentKey == null) { |
| 341 | this.insert(null, items.length, ...values); |
| 342 | } else { |
| 343 | let parentNode = nodeMap.get(parentKey); |
| 344 | if (!parentNode) { |
| 345 | return; |
| 346 | } |
| 347 | |
| 348 | this.insert(parentKey, parentNode.children!.length, ...values); |
| 349 | } |
| 350 | }, |
| 351 | remove(...keys: Key[]) { |
| 352 | if (keys.length === 0) { |
| 353 | return; |