MCPcopy
hub / github.com/anomalyco/opencode / onClose

Function onClose

packages/opencode/test/cli/run/runtime.queue.test.ts:29–39  ·  view source on GitHub ↗
(fn)

Source from the content-addressed store, hash-verified

27 }
28 },
29 onClose(fn) {
30 if (closed) {
31 fn()
32 return () => {}
33 }
34
35 closes.add(fn)
36 return () => {
37 closes.delete(fn)
38 }
39 },
40 event(next) {
41 events.push(next)
42 },

Callers

nothing calls this directly

Calls 3

addMethod · 0.65
fnFunction · 0.50
deleteMethod · 0.45

Tested by

no test coverage detected