Skip to content

Commit

Permalink
Extract extended IncomingMessage to its own type
Browse files Browse the repository at this point in the history
  • Loading branch information
matt-cratebind committed Dec 2, 2020
1 parent 2ba058d commit edcc50a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion packages/next/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,14 @@ export type GetStaticPaths<P extends ParsedUrlQuery = ParsedUrlQuery> = (
context: GetStaticPathsContext
) => Promise<GetStaticPathsResult<P>>

export type ExtendedIncomingMessage = IncomingMessage & {
cookies?: { [key: string]: any }
}

export type GetServerSidePropsContext<
Q extends ParsedUrlQuery = ParsedUrlQuery
> = {
req: IncomingMessage & { cookies?: { [key: string]: any } }
req: ExtendedIncomingMessage
res: ServerResponse
params?: Q
query: ParsedUrlQuery
Expand Down

0 comments on commit edcc50a

Please sign in to comment.