export type Body = ConstructorParameters[0]; export type ResponseOptions = ConstructorParameters[1]; export function badRequest(body?: Body, options?: ResponseOptions): Response { return new Response(body, { status: 400, ...options }); } export function html(body: Body, options?: ResponseOptions): Response { return new Response(body, { ...options, headers: { 'Content-Type': 'text/html', ...options?.headers }, }); }