.
This commit is contained in:
+35
@@ -0,0 +1,35 @@
|
||||
import type { AppDirModules } from '../../build/webpack/loaders/next-app-loader';
|
||||
/**
|
||||
* LoaderTree is generated in next-app-loader.
|
||||
*/
|
||||
export type LoaderTree = [
|
||||
segment: string,
|
||||
parallelRoutes: {
|
||||
[parallelRouterKey: string]: LoaderTree;
|
||||
},
|
||||
modules: AppDirModules,
|
||||
/**
|
||||
* At build time, for each dynamic segment, we compute the list of static
|
||||
* sibling segments that exist at the same URL path level. This is used by
|
||||
* the client router to determine if a prefetch can be reused.
|
||||
*
|
||||
* For example, given the following file structure:
|
||||
* /app/(group1)/products/sale/page.tsx -> /products/sale
|
||||
* /app/(group2)/products/[id]/page.tsx -> /products/[id]
|
||||
*
|
||||
* The [id] segment would have staticSiblings: ['sale']
|
||||
*
|
||||
* This accounts for route groups, which may place sibling routes in
|
||||
* different parts of the file system tree but at the same URL level.
|
||||
*
|
||||
* A value of `null` means the static siblings are unknown (e.g., in webpack
|
||||
* dev mode where routes are compiled on-demand).
|
||||
*/
|
||||
staticSiblings: readonly string[] | null
|
||||
];
|
||||
export declare function getLayoutOrPageModule(loaderTree: LoaderTree): Promise<{
|
||||
mod: any;
|
||||
modType: "page" | "layout" | undefined;
|
||||
filePath: string | undefined;
|
||||
}>;
|
||||
export declare function getComponentTypeModule(loaderTree: LoaderTree, moduleType: 'layout' | 'not-found' | 'forbidden' | 'unauthorized'): Promise<any>;
|
||||
Reference in New Issue
Block a user