hoangvvo / next-connect

The TypeScript-ready, minimal router and middleware layer for Next.js, Micro, Vercel, or Node.js http/http2
https://www.npmjs.com/package/next-connect
MIT License
1.62k stars 65 forks source link

TypeScript: Property 'status', 'send', ..etc does not exist on type 'ServerResponse' #175

Closed miladezzat closed 2 years ago

miladezzat commented 2 years ago

Hello @hoangvvo

The methods status, send, json, end and ...etc, don't exists on the ServerResponse.

hoangvvo commented 2 years ago

Are you using TypeScript in API Routes? Make sure to use the proper type as shown in the README: https://github.com/hoangvvo/next-connect#typescript.