import { createRouter } from "@tanstack/react-router"; import { routeTree } from "./routeTree.gen"; export interface RouterContext { auth: { session: object | null; isPending: boolean; isAuthenticated: boolean; signIn: (password: string) => Promise; signOut: () => Promise; changePassword: (currentPassword: string, newPassword: string) => Promise; }; } const router = createRouter({ routeTree, context: {} as RouterContext, }); declare module "@tanstack/react-router" { interface Register { router: typeof router; } } export { router };