From 97fa23e762bf0749b612f52587262bdfe03b884c Mon Sep 17 00:00:00 2001 From: Adam Bergman Date: Tue, 10 Mar 2020 10:55:28 +0100 Subject: [PATCH] fix(gatsby): Update types for WrapPageElement*Args (#22120) * 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 --- packages/gatsby/index.d.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/gatsby/index.d.ts b/packages/gatsby/index.d.ts index 5f10e6239180b..2f3e00abfb36d 100644 --- a/packages/gatsby/index.d.ts +++ b/packages/gatsby/index.d.ts @@ -889,9 +889,9 @@ export interface ReplaceRendererArgs extends NodePluginArgs { setBodyProps: Function } -export interface WrapPageElementNodeArgs extends NodePluginArgs { +export interface WrapPageElementNodeArgs extends NodePluginArgs { element: object - props: object + props: PageProps pathname: string } @@ -1305,9 +1305,9 @@ export interface ShouldUpdateScrollArgs extends BrowserPluginArgs { getSavedScrollPosition: Function } -export interface WrapPageElementBrowserArgs extends BrowserPluginArgs { +export interface WrapPageElementBrowserArgs extends BrowserPluginArgs { element: object - props: object + props: PageProps } export interface WrapRootElementBrowserArgs extends BrowserPluginArgs {