MCPcopy Create free account
hub / github.com/Effect-TS/effect / constructor

Method constructor

packages/effect/src/PubSub.ts:2741–2752  ·  view source on GitHub ↗
(buffer: ReplayBuffer<A>)

Source from the content-addressed store, hash-verified

2739 newestIndex = -1
2740
2741 constructor(buffer: ReplayBuffer<A>) {
2742 this.buffer = buffer
2743 this.remaining = buffer.size
2744 this.slideIndex = buffer.index
2745 this.values = new Array(this.remaining)
2746 let node = buffer.head
2747 for (let i = 0; i < this.remaining; i++) {
2748 this.values[i] = node.value as A
2749 this.newestIndex = node.index
2750 node = node.next!
2751 }
2752 }
2753 close(): void {
2754 this.values.length = 0
2755 this.remaining = 0

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected