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

Method constructor

packages/effect/src/PubSub.ts:1708–1715  ·  view source on GitHub ↗
(capacity: number, replayBuffer: ReplayBuffer<A> | undefined)

Source from the content-addressed store, hash-verified

1706 readonly replayBuffer: ReplayBuffer<A> | undefined
1707
1708 constructor(capacity: number, replayBuffer: ReplayBuffer<A> | undefined) {
1709 this.capacity = capacity
1710 this.replayBuffer = replayBuffer
1711 this.array = Array.from({ length: capacity })
1712 this.replayIndices = replayBuffer ? Array.from({ length: capacity }) : []
1713 this.mask = capacity - 1
1714 this.subscribers = Array.from({ length: capacity })
1715 }
1716
1717 replayWindow(): PubSub.ReplayWindow<A> {
1718 return this.replayBuffer ? new ReplayWindowImpl(this.replayBuffer) : emptyReplayWindow

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected