feat: add RouteContext type for app router route handlers (#82670)
## Add typed RouteContext for App Router route handlers This PR adds type support for route handlers in the App Router by introducing a new `RouteContext` interface. This allows for strongly-typed access to route parameters in API routes. ### Features: - Adds a new global `RouteContext<AppRouteHandlerRoute>` interface with typed `params` property - Adds test cases for various route parameter patterns - Updates type tests to verify correct type checking for route handlers This enhancement improves the developer experience by providing type safety when accessing route parameters in API route handlers, similar to the existing type support for pages and layouts.
Showing
Please
register
or
sign in
to comment