diff --git a/src/index.ts b/src/index.ts index 0ef3e9e..34f32d7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -10,11 +10,14 @@ import { ZodError } from 'zod'; import { mediaSchema } from '@/schema'; import { validateTurnstile } from '@/turnstile'; +// hono doesn't export this type, so we retrieve it from a function +type SSEStreamingApi = Parameters['1']>['0']; + const app = new Hono(); let eventId = 0; async function writeSSEEvent( - stream: Parameters['1']>['0'], + stream: SSEStreamingApi, event: string, data: any | undefined, ) {