blomqma / next-rest-framework

Type-safe, self-documenting APIs for Next.js
https://next-rest-framework.vercel.app
Other
134 stars 17 forks source link

Fix async middleware typings #165

Closed blomqma closed 3 months ago

blomqma commented 3 months ago

This fixes the TS error when using an async middleware by fixing the return types of the middleware function. This also exports the typings of TypedNextRerquest, TypedNextApiRequest and TypedNextApiResponse so that they can be used for custom abstractions.

vercel[bot] commented 3 months ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
next-rest-framework ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 4, 2024 9:19am
next-rest-framework-demo ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 4, 2024 9:19am