next.js
0d2b5745 - Update App Route Signature (#48348)

Commit
2 years ago
Update App Route Signature (#48348) This updates the app route handler signature to be more correct to prevent the issue with type casting: ```diff - (request: Request, ctx) => Response + (request: NextRequest, ctx) => Promise<Response> | Response ``` This also ensures that the context paramter has the correct types: ```diff type AppRouteHandlerFnContext = { - params?: { [param: string]: any } + params?: Record<string, string | string[]> } ```
Author
Parents
Loading