import { NextApiHandler, GetServerSidePropsContext, GetServerSidePropsResult, NextApiRequest, NextApiResponse } from 'next'; import { IronSessionOptions } from 'iron-session'; import { IncomingMessage, ServerResponse } from 'http'; declare type GetIronSessionApiOptions = (request: NextApiRequest, response: NextApiResponse) => Promise | IronSessionOptions; declare function withIronSessionApiRoute(handler: NextApiHandler, options: IronSessionOptions | GetIronSessionApiOptions): NextApiHandler; declare type GetIronSessionSSROptions = (request: IncomingMessage, response: ServerResponse) => Promise | IronSessionOptions; declare function withIronSessionSsr

(handler: (context: GetServerSidePropsContext) => GetServerSidePropsResult

| Promise>, options: IronSessionOptions | GetIronSessionSSROptions): (context: GetServerSidePropsContext) => Promise>; export { withIronSessionApiRoute, withIronSessionSsr };