UNPKG

1.2 kBTypeScriptView Raw
1/// <reference types="react" />
2import { BuildManifest } from './get-page-files';
3import { AppType, DocumentType } from '../lib/utils';
4import { PageConfig, GetStaticPaths, GetServerSideProps, GetStaticProps } from 'next/types';
5export declare function interopDefault(mod: any): any;
6export declare type ManifestItem = {
7 id: number | string;
8 files: string[];
9};
10declare type ReactLoadableManifest = {
11 [moduleId: string]: ManifestItem;
12};
13export declare type LoadComponentsReturnType = {
14 Component: React.ComponentType;
15 pageConfig?: PageConfig;
16 buildManifest: BuildManifest;
17 reactLoadableManifest: ReactLoadableManifest;
18 Document: DocumentType;
19 App: AppType;
20 getStaticProps?: GetStaticProps;
21 getStaticPaths?: GetStaticPaths;
22 getServerSideProps?: GetServerSideProps;
23 ComponentMod: any;
24};
25export declare function loadDefaultErrorComponents(distDir: string): Promise<{
26 App: any;
27 Document: any;
28 Component: any;
29 buildManifest: any;
30 reactLoadableManifest: {};
31 ComponentMod: any;
32}>;
33export declare function loadComponents(distDir: string, pathname: string, serverless: boolean): Promise<LoadComponentsReturnType>;
34export {};