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