Skip to content

Route tree types #824

Answered by schiller-manuel
tigawanna asked this question in Q&A
Nov 23, 2023 · 2 comments · 20 replies

You must be logged in to vote

How about something like this:

type ValidRoutes = ParseRoute<typeof routeTree>['fullPath'];

// this results in for examples/react/kitchen-sink/src/main.tsx
type ValidRoutes = "/" | "/dashboard" | "/dashboard/" | "/dashboard/invoices" | "/dashboard/invoices/" | "/dashboard/invoices/$invoiceId" | "/dashboard/users" | "/dashboard/users/" | "/dashboard/users/user" | "/expensive" | "/profile" | "/login" | "/layout-a" | "/layout-b"

Replies: 2 comments 20 replies

You must be logged in to vote
16 replies
@tigawanna

@schiller-manuel

Answer selected by tigawanna
@tigawanna

@Michota

@arishem51

@schiller-manuel

You must be logged in to vote
4 replies
@muneer-abdulsattar

@Atchferox

@tigawanna

@schiller-manuel

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
9 participants