import { ZodType, z } from 'zod'; type CleanupFn = (() => void) | void; export class HyperRPCEvent { emitterSetup?: (emit: (x: z.infer) => void, ctx: Ctx) => CleanupFn; constructor(public eventType: T) {} emitter(setup: (emit: (x: z.infer) => void, ctx: Ctx) => CleanupFn) { this.emitterSetup = setup; return this; } filter(fn: (input: z.infer) => Promise) {} }