/// /// import App, { AppContext, AppInitialProps } from 'next/app'; import { Store } from 'redux'; import { GetServerSideProps, GetServerSidePropsContext, GetStaticProps, GetStaticPropsContext, NextComponentType, NextPageContext } from 'next'; /** * Quick note on Next.js return types: * * Page.getInitialProps https://nextjs.org/docs/api-reference/data-fetching/getInitialProps * as-is * * App.getInitialProps: AppInitialProps https://nextjs.org/docs/advanced-features/custom-app * {pageProps: any} * * getStaticProps https://nextjs.org/docs/basic-features/data-fetching#getstaticprops-static-generation * {props: any} * * getServerSideProps https://nextjs.org/docs/basic-features/data-fetching#getserversideprops-server-side-rendering * {props: any} */ export declare const HYDRATE = "__NEXT_REDUX_WRAPPER_HYDRATE__"; export declare type MakeStore = (context: Context) => S; export interface InitStoreOptions { makeStore: MakeStore; context?: Context; } export declare const createWrapper: >(makeStore: MakeStore, config?: Config) => { getServerSideProps:

(callback: GetServerSidePropsCallback) => GetServerSideProps; getStaticProps: (callback: GetStaticPropsCallback) => GetStaticProps; getInitialAppProps: (callback: AppCallback) => GetInitialAppProps; getInitialPageProps: (callback: PageCallback) => ((context: NextPageContext) => any) | undefined; withRedux: (Component: NextComponentType | App | any) => { (props: any): JSX.Element; displayName: string; getInitialProps: any; }; useWrappedStore: ({ initialState: giapState, initialProps, ...props }: any, displayName?: string) => { store: S; props: any; }; }; declare const _default: >(makeStore: MakeStore, config?: Config) => (Component: any) => { (props: any): JSX.Element; displayName: string; getInitialProps: any; }; export default _default; export declare type Context = NextPageContext | AppContext | GetStaticPropsContext | GetServerSidePropsContext; export interface Config { serializeState?: (state: ReturnType) => any; deserializeState?: (state: any) => ReturnType; debug?: boolean; } export interface WrapperProps { initialProps: any; initialState: any; } declare type GetInitialPageProps

= NextComponentType['getInitialProps']; declare type GetInitialAppProps

= ({ Component, ctx }: AppContext) => Promise; export declare type GetStaticPropsCallback = (store: S) => GetStaticProps

; export declare type GetServerSidePropsCallback = (store: S) => GetServerSideProps

; export declare type PageCallback = (store: S) => GetInitialPageProps

; export declare type AppCallback = (store: S) => GetInitialAppProps

; export declare type Callback = GetStaticPropsCallback | GetServerSidePropsCallback | PageCallback | AppCallback; declare module 'next' { interface NextPageContext { /** * Provided by next-redux-wrapper: The redux store */ store: S; } }