1
0
silverbullet/plugos/syscall/event.ts
2022-03-27 11:31:12 +02:00

11 lines
309 B
TypeScript

import { SysCallMapping } from "../system";
import { EventFeature } from "../feature/event";
export function eventSyscalls(eventFeature: EventFeature): SysCallMapping {
return {
async dispatch(ctx, eventName: string, data: any) {
return eventFeature.dispatchEvent(eventName, data);
},
};
}