(edited)
Idea
The VercelApiHandler function should accept VercelResponse as a return type. because currently i have to send a response and do the return on a separate line to avoid type errors.
now
export type VercelApiHandler = (
req: VercelRequest,
res: VercelResponse
) => void | Promise<void>;response.status(200).send(`Hello ${who}!`);return;desired
export type VercelApiHandler = (
req: VercelRequest,
res: VercelResponse
) => void | Promise<void> | VercelResponse;return response.status(200).send(`Hello ${who}!`);