MCPcopy Create free account
hub / github.com/Roy3838/Observer / subscribe

Function subscribe

app/src/utils/pullModelManager.ts:140–148  ·  view source on GitHub ↗
(listener: Listener)

Source from the content-addressed store, hash-verified

138};
139
140const subscribe = (listener: Listener): (() => void) => {
141 listeners.push(listener);
142 return () => { // Return an unsubscribe function
143 const index = listeners.indexOf(listener);
144 if (index > -1) {
145 listeners.splice(index, 1);
146 }
147 };
148};
149
150const getInitialState = (): PullState => {
151 return state;

Callers

nothing calls this directly

Calls 1

pushMethod · 0.80

Tested by

no test coverage detected