MCPcopy Create free account
hub / github.com/arctic-cli/interface / subscribe

Function subscribe

packages/arctic/src/bus/index.ts:67–72  ·  view source on GitHub ↗
(
    def: Definition,
    callback: (event: { type: Definition["type"]; properties: z.infer<Definition["properties"]> }) => void,
  )

Source from the content-addressed store, hash-verified

65 }
66
67 export function subscribe<Definition extends BusEvent.Definition>(
68 def: Definition,
69 callback: (event: { type: Definition["type"]; properties: z.infer<Definition["properties"]> }) => void,
70 ) {
71 return raw(def.type, callback)
72 }
73
74 export function once<Definition extends BusEvent.Definition>(
75 def: Definition,

Callers 1

onceFunction · 0.70

Calls 1

rawFunction · 0.85

Tested by

no test coverage detected