mirror of
https://github.com/movie-web/providers-api.git
synced 2025-09-13 09:43:26 +00:00
Move SSE type into declaration and comment existence
This commit is contained in:
@@ -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<Parameters<typeof streamSSE>['1']>['0'];
|
||||
|
||||
const app = new Hono();
|
||||
|
||||
let eventId = 0;
|
||||
async function writeSSEEvent(
|
||||
stream: Parameters<Parameters<typeof streamSSE>['1']>['0'],
|
||||
stream: SSEStreamingApi,
|
||||
event: string,
|
||||
data: any | undefined,
|
||||
) {
|
||||
|
Reference in New Issue
Block a user