1
0
silverbullet/packages/plugos/syscalls/event.ts

11 lines
308 B
TypeScript
Raw Normal View History

2022-04-05 15:02:17 +00:00
import { SysCallMapping } from "../system";
import { EventHook } from "../hooks/event";
export function eventSyscalls(eventHook: EventHook): SysCallMapping {
return {
2022-04-04 09:51:41 +00:00
"event.dispatch": async (ctx, eventName: string, data: any) => {
return eventHook.dispatchEvent(eventName, data);
},
};
}