Skip to content

Commit c435ed5

Browse files
Proper fix for #412
1 parent 2bb8887 commit c435ed5

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/wrapper/src/index.tsx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import App, {AppContext} from 'next/app';
1+
import App, {AppContext, AppInitialProps} from 'next/app';
22
import React from 'react';
33
import {Provider} from 'react-redux';
44
import {Store} from 'redux';
@@ -259,7 +259,9 @@ export interface WrapperProps {
259259
}
260260

261261
type GetInitialPageProps<P> = NextComponentType<NextPageContext, any, P>['getInitialProps'];
262-
type GetInitialAppProps<P> = typeof App['getInitialProps']; //FIXME P
262+
263+
//FIXME Could be typeof App.getInitialProps & appGetInitialProps (not exported), see https://github.com/kirill-konshin/next-redux-wrapper/issues/412
264+
type GetInitialAppProps<P> = ({Component, ctx}: AppContext) => Promise<AppInitialProps & {pageProps: P}>;
263265

264266
export type GetStaticPropsCallback<S extends Store, P> = (store: S) => GetStaticProps<P>;
265267
export type GetServerSidePropsCallback<S extends Store, P> = (store: S) => GetServerSideProps<P>;

0 commit comments

Comments
 (0)