import { GetServerSidePropsContext , GetStaticPropsContext } from 'next' ; function isServerSidePropsContext ( context ) { if ( typeof context !== 'object' || ! context ) return false ; return ( ! ! ( context as GetServerSidePropsContext ) . req && ! ! ( context as GetServerSidePropsContext ) . res ) ; } export default isServerSidePropsContext ;