()
| 1779 | } |
| 1780 | |
| 1781 | slide(): void { |
| 1782 | if (this.subscribersIndex !== this.publisherIndex) { |
| 1783 | const index = this.subscribersIndex & this.mask |
| 1784 | const value = this.array[index] |
| 1785 | this.array[index] = AbsentValue as unknown as A |
| 1786 | this.subscribers[index] = 0 |
| 1787 | this.subscribersIndex += 1 |
| 1788 | this.replayBuffer?.slide(value, this.replayIndices[index]) |
| 1789 | } |
| 1790 | } |
| 1791 | |
| 1792 | subscribe(): PubSub.BackingSubscription<A> { |
| 1793 | this.subscriberCount += 1 |