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

Method constructor

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

Source from the content-addressed store, hash-verified

1511 readonly replayBuffer: ReplayBuffer<A> | undefined
1512
1513 constructor(capacity: number, replayBuffer: ReplayBuffer<A> | undefined) {
1514 this.capacity = capacity
1515 this.replayBuffer = replayBuffer
1516 this.array = Array.from({ length: capacity })
1517 this.replayIndices = replayBuffer ? Array.from({ length: capacity }) : []
1518 this.subscribers = Array.from({ length: capacity })
1519 }
1520
1521 replayWindow(): PubSub.ReplayWindow<A> {
1522 return this.replayBuffer ? new ReplayWindowImpl(this.replayBuffer) : emptyReplayWindow

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected