Skip to content

Commit

Permalink
fix(gatsby): Update types for WrapPageElement*Args (#22120)
Browse files Browse the repository at this point in the history
* Update WrapPageElement*Args interface

PR #21542 introduced a new type PageProps which can also be used on WrapPageElement*Args interfaces.

* Add generics for data and context
  • Loading branch information
adambrgmn authored Mar 10, 2020
1 parent be7111b commit 97fa23e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/gatsby/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -889,9 +889,9 @@ export interface ReplaceRendererArgs extends NodePluginArgs {
setBodyProps: Function
}

export interface WrapPageElementNodeArgs extends NodePluginArgs {
export interface WrapPageElementNodeArgs<DataType = object, PageContextType = object> extends NodePluginArgs {
element: object
props: object
props: PageProps<DataType, PageContextType>
pathname: string
}

Expand Down Expand Up @@ -1305,9 +1305,9 @@ export interface ShouldUpdateScrollArgs extends BrowserPluginArgs {
getSavedScrollPosition: Function
}

export interface WrapPageElementBrowserArgs extends BrowserPluginArgs {
export interface WrapPageElementBrowserArgs<DataType = object, PageContextType = object> extends BrowserPluginArgs {
element: object
props: object
props: PageProps<DataType, PageContextType>
}

export interface WrapRootElementBrowserArgs extends BrowserPluginArgs {
Expand Down

0 comments on commit 97fa23e

Please sign in to comment.