@@ -0,0 +1,13 @@
|
||||
import { SysCallMapping } from "../system.ts";
|
||||
import { EventHook } from "../hooks/event.ts";
|
||||
|
||||
export function eventSyscalls(eventHook: EventHook): SysCallMapping {
|
||||
return {
|
||||
"event.dispatch": (_ctx, eventName: string, data: any) => {
|
||||
return eventHook.dispatchEvent(eventName, data);
|
||||
},
|
||||
"event.list": () => {
|
||||
return eventHook.listEvents();
|
||||
},
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user