next.js
89e30409 - Implement `Route` type for router APIs (#47931)

Commit
2 years ago
Implement `Route` type for router APIs (#47931) This pull request extends the type checking functionality of the `typedRoutes` feature, which is currently available in the `<Link href={Route}>` component, to the following `router` APIs: `router.push()`, `router.prefetch()`, and `router.replace()`. The implementation leverages the existing work done for the `<Link>` component, allowing for a straightforward integration of type checking into the aforementioned `router` APIs. fix NEXT-501
Author
Parents
Loading