()
| 1583 | } |
| 1584 | |
| 1585 | slide(): void { |
| 1586 | if (this.subscribersIndex !== this.publisherIndex) { |
| 1587 | const index = this.subscribersIndex % this.capacity |
| 1588 | const value = this.array[index] |
| 1589 | this.array[index] = AbsentValue as unknown as A |
| 1590 | this.subscribers[index] = 0 |
| 1591 | this.subscribersIndex += 1 |
| 1592 | this.replayBuffer?.slide(value, this.replayIndices[index]) |
| 1593 | } |
| 1594 | } |
| 1595 | |
| 1596 | subscribe(): PubSub.BackingSubscription<A> { |
| 1597 | this.subscriberCount += 1 |