import { RequestHandler } from 'msw' ; export declare type RequestHandlersList = RequestHandler < any , any , any , any > [ ] ; export const startMocking = ( requestHandlers ) => { if ( typeof window === 'undefined' ) { const { setupServer } = eval ( 'require' ) ( 'msw/node' ) ; const server = setupServer ( ... requestHandlers ) ; server . listen ( ) ; return server ; } else { const { setupWorker } = require ( 'msw' ) ; const worker = setupWorker ( ... requestHandlers ) ; worker . start ( ) ; return worker ; } } ;