1
0
silverbullet/plugos/syscall/event.ts

11 lines
309 B
TypeScript
Raw Normal View History

2022-03-27 09:26:13 +00:00
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);
},
};
}