Way to keep a route active while preventing it from being used? #3397
allan-cannon
started this conversation in
General
Replies: 1 comment 3 replies
-
what would "preventing" mean here? cause a TS error? |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
TL;DR - Is there a way to keep a route path functionally active for backwards compatibility while also removing it from the Typescript path definitions so it doesn't get accidentally used in the future?
I recently refactored some routes in a way that is basically a rename, e.g.
foo/$id/summary
->bar/$id/summary
. I removed all navigation to the old routes and added redirects to the old route definitions. That's great but the old routes still appear as valid routes with Typescript.Is there a good way to prevent that while still maintaining backwards compatibility with the routes?
Beta Was this translation helpful? Give feedback.
All reactions