import ApolloClient from 'apollo-client'; import { AppProps, default as NextApp, DefaultAppIProps } from 'next/app'; import PropTypes from 'prop-types'; import React from 'react'; import { ApolloContext, InitApolloClient, WithApolloOptions, WithApolloProps } from './types'; export default function withApollo(client: InitApolloClient, options?: WithApolloOptions): (App: typeof NextApp) => { new (props: WithApolloProps & AppProps> & DefaultAppIProps): { apollo: ApolloClient; render(): JSX.Element; context: any; setState(state: {} | ((prevState: Readonly<{}>, props: Readonly & AppProps> & DefaultAppIProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void; forceUpdate(callBack?: (() => void) | undefined): void; readonly props: Readonly<{ children?: React.ReactNode; }> & Readonly & AppProps> & DefaultAppIProps>; state: Readonly<{}>; refs: { [key: string]: React.ReactInstance; }; }; displayName: string; propTypes: { apolloState: PropTypes.Requireable; apollo: PropTypes.Requireable; }; getInitialProps: (appCtx: ApolloContext>) => Promise<{}>; contextType?: React.Context | undefined; };