Skip to content

Commit

Permalink
Proper fix for #412
Browse files Browse the repository at this point in the history
  • Loading branch information
kirill-konshin committed Sep 13, 2021
1 parent 2bb8887 commit c435ed5
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/wrapper/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import App, {AppContext} from 'next/app';
import App, {AppContext, AppInitialProps} from 'next/app';
import React from 'react';
import {Provider} from 'react-redux';
import {Store} from 'redux';
Expand Down Expand Up @@ -259,7 +259,9 @@ export interface WrapperProps {
}

type GetInitialPageProps<P> = NextComponentType<NextPageContext, any, P>['getInitialProps'];
type GetInitialAppProps<P> = typeof App['getInitialProps']; //FIXME P

//FIXME Could be typeof App.getInitialProps & appGetInitialProps (not exported), see https://github.com/kirill-konshin/next-redux-wrapper/issues/412
type GetInitialAppProps<P> = ({Component, ctx}: AppContext) => Promise<AppInitialProps & {pageProps: P}>;

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

0 comments on commit c435ed5

Please sign in to comment.