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

Method offer

packages/effect/src/PubSub.ts:2709–2725  ·  view source on GitHub ↗
(a: A)

Source from the content-addressed store, hash-verified

2707 this.index++
2708 }
2709 offer(a: A): number {
2710 const index = this.publisherIndex++
2711 this.tail.value = a
2712 this.tail.index = index
2713 this.tail.next = {
2714 value: AbsentValue,
2715 index: 0,
2716 next: null
2717 }
2718 this.tail = this.tail.next
2719 if (this.size === this.capacity) {
2720 this.head = this.head.next!
2721 } else {
2722 this.size += 1
2723 }
2724 return index
2725 }
2726 offerAll(as: Iterable<A>): void {
2727 for (const a of as) {
2728 this.offer(a)

Callers 15

offerAllMethod · 0.95
rpc-schemas.tsFile · 0.80
watchNodeFunction · 0.80
DenoSocket.test.tsFile · 0.80
rpc-schemas.tsFile · 0.80
NodeSocket.test.tsFile · 0.80
rpc-schemas.tsFile · 0.80
TxQueue.test.tsFile · 0.80

Calls

no outgoing calls

Tested by 1

writeFunction · 0.64