MCPcopy Index your code
hub / github.com/anomalyco/opencode / acquireResource

Function acquireResource

packages/opencode/test/fixture/tui-plugin.ts:161–166  ·  view source on GitHub ↗
(_key: symbol, setup: () => () => void)

Source from the content-addressed store, hash-verified

159 opts.keymap ??
160 ({
161 acquireResource(_key: symbol, setup: () => () => void) {
162 const dispose = setup()
163 return () => {
164 dispose()
165 }
166 },
167 registerLayer() {
168 if (count) count.command_add += 1
169 return () => {

Callers

nothing calls this directly

Calls 2

setupFunction · 0.50
disposeFunction · 0.50

Tested by

no test coverage detected