React Example: Start Clerk Basic

ts
/* eslint-disable */

// @ts-nocheck

// noinspection JSUnusedGlobalSymbols

// This file was automatically generated by TanStack Router.
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

import { Route as rootRouteImport } from './routes/__root'
import { Route as AuthedRouteImport } from './routes/_authed'
import { Route as IndexRouteImport } from './routes/index'
import { Route as AuthedPostsRouteImport } from './routes/_authed/posts'
import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index'
import { Route as AuthedProfileSplatRouteImport } from './routes/_authed/profile.$'
import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId'

const AuthedRoute = AuthedRouteImport.update({
  id: '/_authed',
  getParentRoute: () => rootRouteImport,
} as any)
const IndexRoute = IndexRouteImport.update({
  id: '/',
  path: '/',
  getParentRoute: () => rootRouteImport,
} as any)
const AuthedPostsRoute = AuthedPostsRouteImport.update({
  id: '/posts',
  path: '/posts',
  getParentRoute: () => AuthedRoute,
} as any)
const AuthedPostsIndexRoute = AuthedPostsIndexRouteImport.update({
  id: '/',
  path: '/',
  getParentRoute: () => AuthedPostsRoute,
} as any)
const AuthedProfileSplatRoute = AuthedProfileSplatRouteImport.update({
  id: '/profile/$',
  path: '/profile/$',
  getParentRoute: () => AuthedRoute,
} as any)
const AuthedPostsPostIdRoute = AuthedPostsPostIdRouteImport.update({
  id: '/$postId',
  path: '/$postId',
  getParentRoute: () => AuthedPostsRoute,
} as any)

export interface FileRoutesByFullPath {
  '/': typeof IndexRoute
  '/posts': typeof AuthedPostsRouteWithChildren
  '/posts/$postId': typeof AuthedPostsPostIdRoute
  '/profile/$': typeof AuthedProfileSplatRoute
  '/posts/': typeof AuthedPostsIndexRoute
}
export interface FileRoutesByTo {
  '/': typeof IndexRoute
  '/posts/$postId': typeof AuthedPostsPostIdRoute
  '/profile/$': typeof AuthedProfileSplatRoute
  '/posts': typeof AuthedPostsIndexRoute
}
export interface FileRoutesById {
  __root__: typeof rootRouteImport
  '/': typeof IndexRoute
  '/_authed': typeof AuthedRouteWithChildren
  '/_authed/posts': typeof AuthedPostsRouteWithChildren
  '/_authed/posts/$postId': typeof AuthedPostsPostIdRoute
  '/_authed/profile/$': typeof AuthedProfileSplatRoute
  '/_authed/posts/': typeof AuthedPostsIndexRoute
}
export interface FileRouteTypes {
  fileRoutesByFullPath: FileRoutesByFullPath
  fullPaths: '/' | '/posts' | '/posts/$postId' | '/profile/$' | '/posts/'
  fileRoutesByTo: FileRoutesByTo
  to: '/' | '/posts/$postId' | '/profile/$' | '/posts'
  id:
    | '__root__'
    | '/'
    | '/_authed'
    | '/_authed/posts'
    | '/_authed/posts/$postId'
    | '/_authed/profile/$'
    | '/_authed/posts/'
  fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
  IndexRoute: typeof IndexRoute
  AuthedRoute: typeof AuthedRouteWithChildren
}

declare module '@tanstack/react-router' {
  interface FileRoutesByPath {
    '/_authed': {
      id: '/_authed'
      path: ''
      fullPath: ''
      preLoaderRoute: typeof AuthedRouteImport
      parentRoute: typeof rootRouteImport
    }
    '/': {
      id: '/'
      path: '/'
      fullPath: '/'
      preLoaderRoute: typeof IndexRouteImport
      parentRoute: typeof rootRouteImport
    }
    '/_authed/posts': {
      id: '/_authed/posts'
      path: '/posts'
      fullPath: '/posts'
      preLoaderRoute: typeof AuthedPostsRouteImport
      parentRoute: typeof AuthedRoute
    }
    '/_authed/posts/': {
      id: '/_authed/posts/'
      path: '/'
      fullPath: '/posts/'
      preLoaderRoute: typeof AuthedPostsIndexRouteImport
      parentRoute: typeof AuthedPostsRoute
    }
    '/_authed/profile/$': {
      id: '/_authed/profile/$'
      path: '/profile/$'
      fullPath: '/profile/$'
      preLoaderRoute: typeof AuthedProfileSplatRouteImport
      parentRoute: typeof AuthedRoute
    }
    '/_authed/posts/$postId': {
      id: '/_authed/posts/$postId'
      path: '/$postId'
      fullPath: '/posts/$postId'
      preLoaderRoute: typeof AuthedPostsPostIdRouteImport
      parentRoute: typeof AuthedPostsRoute
    }
  }
}

interface AuthedPostsRouteChildren {
  AuthedPostsPostIdRoute: typeof AuthedPostsPostIdRoute
  AuthedPostsIndexRoute: typeof AuthedPostsIndexRoute
}

const AuthedPostsRouteChildren: AuthedPostsRouteChildren = {
  AuthedPostsPostIdRoute: AuthedPostsPostIdRoute,
  AuthedPostsIndexRoute: AuthedPostsIndexRoute,
}

const AuthedPostsRouteWithChildren = AuthedPostsRoute._addFileChildren(
  AuthedPostsRouteChildren,
)

interface AuthedRouteChildren {
  AuthedPostsRoute: typeof AuthedPostsRouteWithChildren
  AuthedProfileSplatRoute: typeof AuthedProfileSplatRoute
}

const AuthedRouteChildren: AuthedRouteChildren = {
  AuthedPostsRoute: AuthedPostsRouteWithChildren,
  AuthedProfileSplatRoute: AuthedProfileSplatRoute,
}

const AuthedRouteWithChildren =
  AuthedRoute._addFileChildren(AuthedRouteChildren)

const rootRouteChildren: RootRouteChildren = {
  IndexRoute: IndexRoute,
  AuthedRoute: AuthedRouteWithChildren,
}
export const routeTree = rootRouteImport
  ._addFileChildren(rootRouteChildren)
  ._addFileTypes<FileRouteTypes>()

import type { getRouter } from './router.tsx'
import type { createStart } from '@tanstack/react-start'
declare module '@tanstack/react-start' {
  interface Register {
    router: Awaited<ReturnType<typeof getRouter>>
  }
}
/* eslint-disable */

// @ts-nocheck

// noinspection JSUnusedGlobalSymbols

// This file was automatically generated by TanStack Router.
// You should NOT make any changes in this file as it will be overwritten.
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.

import { Route as rootRouteImport } from './routes/__root'
import { Route as AuthedRouteImport } from './routes/_authed'
import { Route as IndexRouteImport } from './routes/index'
import { Route as AuthedPostsRouteImport } from './routes/_authed/posts'
import { Route as AuthedPostsIndexRouteImport } from './routes/_authed/posts.index'
import { Route as AuthedProfileSplatRouteImport } from './routes/_authed/profile.$'
import { Route as AuthedPostsPostIdRouteImport } from './routes/_authed/posts.$postId'

const AuthedRoute = AuthedRouteImport.update({
  id: '/_authed',
  getParentRoute: () => rootRouteImport,
} as any)
const IndexRoute = IndexRouteImport.update({
  id: '/',
  path: '/',
  getParentRoute: () => rootRouteImport,
} as any)
const AuthedPostsRoute = AuthedPostsRouteImport.update({
  id: '/posts',
  path: '/posts',
  getParentRoute: () => AuthedRoute,
} as any)
const AuthedPostsIndexRoute = AuthedPostsIndexRouteImport.update({
  id: '/',
  path: '/',
  getParentRoute: () => AuthedPostsRoute,
} as any)
const AuthedProfileSplatRoute = AuthedProfileSplatRouteImport.update({
  id: '/profile/$',
  path: '/profile/$',
  getParentRoute: () => AuthedRoute,
} as any)
const AuthedPostsPostIdRoute = AuthedPostsPostIdRouteImport.update({
  id: '/$postId',
  path: '/$postId',
  getParentRoute: () => AuthedPostsRoute,
} as any)

export interface FileRoutesByFullPath {
  '/': typeof IndexRoute
  '/posts': typeof AuthedPostsRouteWithChildren
  '/posts/$postId': typeof AuthedPostsPostIdRoute
  '/profile/$': typeof AuthedProfileSplatRoute
  '/posts/': typeof AuthedPostsIndexRoute
}
export interface FileRoutesByTo {
  '/': typeof IndexRoute
  '/posts/$postId': typeof AuthedPostsPostIdRoute
  '/profile/$': typeof AuthedProfileSplatRoute
  '/posts': typeof AuthedPostsIndexRoute
}
export interface FileRoutesById {
  __root__: typeof rootRouteImport
  '/': typeof IndexRoute
  '/_authed': typeof AuthedRouteWithChildren
  '/_authed/posts': typeof AuthedPostsRouteWithChildren
  '/_authed/posts/$postId': typeof AuthedPostsPostIdRoute
  '/_authed/profile/$': typeof AuthedProfileSplatRoute
  '/_authed/posts/': typeof AuthedPostsIndexRoute
}
export interface FileRouteTypes {
  fileRoutesByFullPath: FileRoutesByFullPath
  fullPaths: '/' | '/posts' | '/posts/$postId' | '/profile/$' | '/posts/'
  fileRoutesByTo: FileRoutesByTo
  to: '/' | '/posts/$postId' | '/profile/$' | '/posts'
  id:
    | '__root__'
    | '/'
    | '/_authed'
    | '/_authed/posts'
    | '/_authed/posts/$postId'
    | '/_authed/profile/$'
    | '/_authed/posts/'
  fileRoutesById: FileRoutesById
}
export interface RootRouteChildren {
  IndexRoute: typeof IndexRoute
  AuthedRoute: typeof AuthedRouteWithChildren
}

declare module '@tanstack/react-router' {
  interface FileRoutesByPath {
    '/_authed': {
      id: '/_authed'
      path: ''
      fullPath: ''
      preLoaderRoute: typeof AuthedRouteImport
      parentRoute: typeof rootRouteImport
    }
    '/': {
      id: '/'
      path: '/'
      fullPath: '/'
      preLoaderRoute: typeof IndexRouteImport
      parentRoute: typeof rootRouteImport
    }
    '/_authed/posts': {
      id: '/_authed/posts'
      path: '/posts'
      fullPath: '/posts'
      preLoaderRoute: typeof AuthedPostsRouteImport
      parentRoute: typeof AuthedRoute
    }
    '/_authed/posts/': {
      id: '/_authed/posts/'
      path: '/'
      fullPath: '/posts/'
      preLoaderRoute: typeof AuthedPostsIndexRouteImport
      parentRoute: typeof AuthedPostsRoute
    }
    '/_authed/profile/$': {
      id: '/_authed/profile/$'
      path: '/profile/$'
      fullPath: '/profile/$'
      preLoaderRoute: typeof AuthedProfileSplatRouteImport
      parentRoute: typeof AuthedRoute
    }
    '/_authed/posts/$postId': {
      id: '/_authed/posts/$postId'
      path: '/$postId'
      fullPath: '/posts/$postId'
      preLoaderRoute: typeof AuthedPostsPostIdRouteImport
      parentRoute: typeof AuthedPostsRoute
    }
  }
}

interface AuthedPostsRouteChildren {
  AuthedPostsPostIdRoute: typeof AuthedPostsPostIdRoute
  AuthedPostsIndexRoute: typeof AuthedPostsIndexRoute
}

const AuthedPostsRouteChildren: AuthedPostsRouteChildren = {
  AuthedPostsPostIdRoute: AuthedPostsPostIdRoute,
  AuthedPostsIndexRoute: AuthedPostsIndexRoute,
}

const AuthedPostsRouteWithChildren = AuthedPostsRoute._addFileChildren(
  AuthedPostsRouteChildren,
)

interface AuthedRouteChildren {
  AuthedPostsRoute: typeof AuthedPostsRouteWithChildren
  AuthedProfileSplatRoute: typeof AuthedProfileSplatRoute
}

const AuthedRouteChildren: AuthedRouteChildren = {
  AuthedPostsRoute: AuthedPostsRouteWithChildren,
  AuthedProfileSplatRoute: AuthedProfileSplatRoute,
}

const AuthedRouteWithChildren =
  AuthedRoute._addFileChildren(AuthedRouteChildren)

const rootRouteChildren: RootRouteChildren = {
  IndexRoute: IndexRoute,
  AuthedRoute: AuthedRouteWithChildren,
}
export const routeTree = rootRouteImport
  ._addFileChildren(rootRouteChildren)
  ._addFileTypes<FileRouteTypes>()

import type { getRouter } from './router.tsx'
import type { createStart } from '@tanstack/react-start'
declare module '@tanstack/react-start' {
  interface Register {
    router: Awaited<ReturnType<typeof getRouter>>
  }
}
Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.

Subscribe to Bytes

Your weekly dose of JavaScript news. Delivered every Monday to over 100,000 devs, for free.

Bytes

No spam. Unsubscribe at any time.