Skip to content

Commit

Permalink
Revert sharing of load-components type
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Jan 17, 2020
1 parent 30ad22f commit 40b3e68
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions packages/next/next-server/server/render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ import {
SERVER_PROPS_SSG_CONFLICT,
} from '../../lib/constants'
import { AMP_RENDER_TARGET } from '../lib/constants'
import { LoadComponentsReturnType } from './load-components'

export type ManifestItem = {
id: number | string
Expand Down Expand Up @@ -127,7 +126,7 @@ function render(
return { html, head }
}

type RenderOpts = LoadComponentsReturnType & {
type RenderOpts = {
documentMiddlewareEnabled: boolean
staticMarkup: boolean
buildId: string
Expand Down Expand Up @@ -155,6 +154,21 @@ type RenderOpts = LoadComponentsReturnType & {
ampValidator?: (html: string, pathname: string) => Promise<void>
isDataReq: boolean
params: { [key: string]: string }
unstable_getStaticProps?: (params: {
params: { [key: string]: string | string[] }
}) => {
props: any
revalidate?: number | boolean
}
unstable_getStaticPaths?: () => Promise<
Array<string | { [key: string]: string | string[] }>
>
unstable_getServerProps?: (context: {
params: { [key: string]: string | string[] }
req: IncomingMessage
res: ServerResponse
query: ParsedUrlQuery
}) => Promise<{ [key: string]: any }>
}

function renderDocument(
Expand Down

0 comments on commit 40b3e68

Please sign in to comment.