(ref: AtomRef<A>)
| 338 | } |
| 339 | |
| 340 | remove(ref: AtomRef<A>) { |
| 341 | const index = this.value.indexOf(ref) |
| 342 | if (index !== -1) { |
| 343 | this.value.splice(index, 1) |
| 344 | this.notify(this.value) |
| 345 | } |
| 346 | return this |
| 347 | } |
| 348 | |
| 349 | toArray() { |
| 350 | return this.value.map((ref) => ref.value) |