/// import type { Redirect, Rewrite } from 'next/dist/lib/load-custom-routes'; import type { I18NConfig, NextConfig, NextConfigComplete } from 'next/dist/server/config-shared'; import type { UrlObject } from 'url'; export declare type Url = UrlObject | string; declare type TAnyLocale = Exclude; export declare type TReRoutes = { redirects: Redirect[]; rewrites: Rewrite[]; }; export declare type TRouteSegmentPaths = { default: string; } & Partial>; export declare type TRouteSegmentData = string | ({ default?: string; } & Partial>); export declare type TRouteSegmentsData = Record>; export declare type TRouteSegment = { name: string; paths: TRouteSegmentPaths; }; export declare type TRouteBranch = TRouteSegment & { children?: TRouteBranch[]; }; export declare type TNtrData = { debug?: boolean | 'withPrefetch'; defaultLocale: string; locales: string[]; routesTree: TRouteBranch; }; export declare type NTRConfig = { debug?: boolean; routesDataFileName?: string; routesTree?: TRouteBranch; pagesDirectory?: string; }; export declare type NextConfigWithNTR = NextConfig & { i18n: I18NConfig; translateRoutes?: NTRConfig; }; export declare type NextConfigCompleteWithNTR = NextConfigComplete & { i18n: I18NConfig; translateRoutes: NTRConfig; }; declare global { var __NEXT_TRANSLATE_ROUTES_DATA: TNtrData; interface Window { __NEXT_TRANSLATE_ROUTES_DATA: TNtrData; } interface ErrorConstructor { new (message?: string, options?: { cause: unknown | string | Error; }): Error; } } export {};