Function
subscribe
(
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, |
Tested by
no test coverage detected