Files
plainleaf/lib/plugos/syscalls/event.ts
T
wbhoustonandGitHub f72e4bbfdb Update Lua to event.listEvents to match plugos syscall (#1397)
The documentation, example, and other function names use
`event.listEvents`, but `event.list` is being registered with the
client.
2025-05-13 20:29:49 +02:00

14 lines
395 B
TypeScript

import type { SysCallMapping } from "../system.ts";
import type { EventHookI } from "../eventhook.ts";
export function eventSyscalls(eventHook: EventHookI): SysCallMapping {
return {
"event.dispatch": (_ctx, eventName: string, data: any) => {
return eventHook.dispatchEvent(eventName, data);
},
"event.listEvents": () => {
return eventHook.listEvents();
},
};
}