TanStackT
TanStack2y ago
4 replies
excited-coffee

Is there a exported type that returns all available absolute routes?

Hi!

I have this example where i have an array of objects used for a long list of links:

interface NavTabType {
  name: string;
  href: TypeThatReturnsAllRoutes?;
}

const Navigation: NavTabType[] = [
  { name: "API keys", href: "/path/to/api", },
  { name: "Account", href: "/path/to/account" }
];


Currently href has the string type assigned but is there a type that i can assign it that returns all available absolute routes?
Was this page helpful?