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

Method unsubscribe

packages/effect/src/PubSub.ts:2027–2038  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2025 }
2026
2027 unsubscribe(): void {
2028 if (!this.unsubscribed) {
2029 this.unsubscribed = true
2030 this.self.subscriberCount -= 1
2031 if (this.subscriberIndex !== this.self.publisherIndex) {
2032 this.self.subscribers -= 1
2033 if (this.self.subscribers === 0) {
2034 this.self.value = AbsentValue as unknown as A
2035 }
2036 }
2037 }
2038 }
2039}
2040
2041interface Node<out A> {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected