import * as React from "react"; import { NextContext } from "."; export interface RenderPageResponse { buildManifest: { [key: string]: any }; chunks: { names: string[]; filenames: string[]; }; html?: string; head: Array>; errorHtml: string; } export interface PageProps { url: string; } export interface AnyPageProps extends PageProps { [key: string]: any; } export type Enhancer = (page: React.ComponentType

) => React.ComponentType; /** * Context object used inside `Document` */ export interface NextDocumentContext extends NextContext { /** A callback that executes the actual React rendering logic (synchronously) */ renderPage(enhancer?: Enhancer): RenderPageResponse; // tslint:disable-line:no-unnecessary-generics } export interface DocumentProps { __NEXT_DATA__?: any; dev?: boolean; chunks?: { names: string[]; filenames: string[]; }; html?: string; head?: Array>; errorHtml?: string; styles?: Array>; [key: string]: any; } export interface HeadProps { nonce?: string; [key: string]: any; } export interface NextScriptProps { nonce?: string; } export class Head extends React.Component {} export class Main extends React.Component {} export class NextScript extends React.Component {} export default class extends React.Component { static getInitialProps(ctx: NextDocumentContext): Promise | DocumentProps; }