Skip to content

Route tree types #824

Answered by schiller-manuel
tigawanna asked this question in Q&A
Nov 23, 2023 · 1 comments · 16 replies
Discussion options

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: 1 comment 16 replies

Comment options

You must be logged in to vote
16 replies
@tigawanna
Comment options

@schiller-manuel
Comment options

Answer selected by tigawanna
@tigawanna
Comment options

@Michota
Comment options

@arishem51
Comment options

@schiller-manuel
Comment options

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