import { EnvironmentInjector, InjectionToken, Injector, type Provider } from '@angular/core'; import type { RouterHistory } from '@tanstack/history'; import { type AnyRoute, type AnyRouter, type CreateRouterFn, type RouterConstructorOptions, RouterCore, type RouterState, type TrailingSlashOption } from '@tanstack/router-core'; import { type Observable } from 'rxjs'; import type { RouteComponent } from './route'; declare module '@tanstack/history' { interface HistoryState { __tempLocation?: HistoryLocation; __tempKey?: string; __hashScrollIntoViewOptions?: boolean | ScrollIntoViewOptions; } } declare module '@tanstack/router-core' { interface RouterOptionsExtensions { /** * The default `component` a route should use if no component is provided. * * @default Outlet * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultcomponent-property) */ defaultComponent?: () => RouteComponent; /** * The default `errorComponent` a route should use if no error component is provided. * * @default ErrorComponent * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaulterrorcomponent-property) * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#handling-errors-with-routeoptionserrorcomponent) */ defaultErrorComponent?: () => RouteComponent; /** * The default `pendingComponent` a route should use if no pending component is provided. * * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultpendingcomponent-property) * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/data-loading#showing-a-pending-component) */ defaultPendingComponent?: () => RouteComponent; /** * The default `notFoundComponent` a route should use if no notFound component is provided. * * @default NotFound * @link [API Docs](https://tanstack.com/router/latest/docs/framework/solid/api/router/RouterOptionsType#defaultnotfoundcomponent-property) * @link [Guide](https://tanstack.com/router/latest/docs/framework/solid/guide/not-found-errors#default-router-wide-not-found-handling) */ defaultNotFoundComponent?: () => RouteComponent; /** * The default `onCatch` handler for errors caught by the Router ErrorBoundary * * @link [API Docs](https://tanstack.com/router/latest/docs/framework/react/api/router/RouterOptionsType#defaultoncatch-property) * @link [Guide](https://tanstack.com/router/latest/docs/framework/react/guide/data-loading#handling-errors-with-routeoptionsoncatch) */ defaultOnCatch?: (error: Error) => void; } } export declare const ROUTER: InjectionToken>>; export declare const ROUTER_STATE: InjectionToken>>>; export declare function injectRouter(): NgRouter>; export declare function injectRouterState(): Observable>>; export declare function provideRouter(router: AnyRouter): ({ provide: InjectionToken>>; useValue: AnyRouter; useFactory?: undefined; } | { provide: InjectionToken>>>; useFactory: () => Observable>>; useValue?: undefined; })[]; export declare const createRouter: CreateRouterFn; export declare class NgRouter = Record> extends RouterCore { private injectors; private envInjectors; constructor(options: RouterConstructorOptions); getRouteInjector(routeId: string, parent: Injector, providers?: Provider[]): Injector; getRouteEnvInjector(routeId: string, parent: EnvironmentInjector, providers: Provider[] | undefined, router: AnyRouter): EnvironmentInjector; }