561aa6891f
Big bang migration to Deno 🤯
14 lines
379 B
TypeScript
14 lines
379 B
TypeScript
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();
|
|
},
|
|
};
|
|
}
|