MCPcopy Index your code
hub / github.com/simstudioai/sim / subscribe

Method subscribe

apps/sim/lib/events/pubsub.ts:127–132  ·  view source on GitHub ↗
(handler: (event: T) => void)

Source from the content-addressed store, hash-verified

125 }
126
127 subscribe(handler: (event: T) => void): () => void {
128 this.emitter.on(this.config.channel, handler)
129 return () => {
130 this.emitter.off(this.config.channel, handler)
131 }
132 }
133
134 dispose(): void {
135 this.emitter.removeAllListeners()

Callers

nothing calls this directly

Calls 2

onMethod · 0.80
offMethod · 0.80

Tested by

no test coverage detected