Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(typed-routes): Fix route type fallback (#73271)
### What? This PR updates the fallback type for typed routes to match the one in https://github.com/vercel/next.js/blob/canary/packages/next/src/types.ts#L58. ### Why? During builds, the `Route` type is initialized as the fallback type before being populated by the routes. This causes temporary type warnings in the project, since a route like `"" | Route` becomes `"" | string` which can raise an ts-eslint error like `"" is overridden by string in this union type`. This becomes a problem in both failed builds, and in CI where a linter and a build can run in parallel. Updating the type to match the stub type fixes the issue. Co-authored-by: Sam Ko <[email protected]> Co-authored-by: JJ Kasper <[email protected]>
- Loading branch information