Skip to content

Commit 2c9f67c

Browse files
ashhitchLekoArts
andauthored
chore(gatsby): Add getServerData to PageProps type (#34003)
Co-authored-by: Lennart <[email protected]>
1 parent 8a1e1f0 commit 2c9f67c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packages/gatsby/index.d.ts

+4-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ export const prefetchPathname: (path: string) => void
8080
export type PageProps<
8181
DataType = object,
8282
PageContextType = object,
83-
LocationState = WindowLocation["state"]
83+
LocationState = WindowLocation["state"],
84+
ServerDataType = object
8485
> = {
8586
/** The path for this current page */
8687
path: string
@@ -141,6 +142,8 @@ export type PageProps<
141142
* ..
142143
*/
143144
pageContext: PageContextType
145+
/** Data passed into the page via the [getServerData](https://www.gatsbyjs.com/docs/reference/rendering-options/server-side-rendering/) SSR function. */
146+
serverData: ServerDataType
144147
}
145148

146149
export interface PageRendererProps {

0 commit comments

Comments
 (0)