MCPcopy Index your code
hub / github.com/scriptscat/scriptcat / subscribe

Method subscribe

packages/message/message_queue.ts:70–73  ·  view source on GitHub ↗
(topic: string, handler: (msg: T) => void)

Source from the content-addressed store, hash-verified

68 }
69
70 subscribe<T>(topic: string, handler: (msg: T) => void) {
71 this.EE.on(topic, handler);
72 return this.EE.off.bind(this.EE, topic, handler) as () => void;
73 }
74
75 publish<T>(topic: string, message: NonNullable<T>) {
76 chrome.runtime.sendMessage({

Callers

nothing calls this directly

Calls 1

onMethod · 0.45

Tested by

no test coverage detected