Skip to content

Commit 696427e

Browse files
authored
chore(gatsby): Add loadPageDataSync property to onRenderBody TS type (#36492)
* feat(gatsby): expose loadPageDataSync According to #35841 (reply in thread) there is a `loadPageDataSync` function, which returns the page context to the corresponding `pathname`. So far this was not reflected in the type definitions, what is changed with this PR. * chore(typing): remove generic context Remove generic context as it can be different for each pathname.
1 parent b005669 commit 696427e

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/gatsby/index.d.ts

+1
Original file line numberDiff line numberDiff line change
@@ -990,6 +990,7 @@ type ReactProps<T extends Element> = React.DetailedHTMLProps<
990990
T
991991
>
992992
export interface RenderBodyArgs {
993+
loadPageDataSync: (pathname: string) => { result: Record<string, unknown> }
993994
pathname: string
994995
setHeadComponents: (comp: React.ReactNode[]) => void
995996
setHtmlAttributes: (attr: ReactProps<HTMLHtmlElement>) => void

0 commit comments

Comments
 (0)