import { createAdapter , RedisAdapterOptions } from 'socket.io-redis' ; export function createRedisAdapter ( options ) ; export function createRedisAdapter ( options ) ; export function createRedisAdapter ( options ) { if ( options . host && options . port ) { return createAdapter ( 'redis://' + options . host + ':' + options . port , options ) ; } if ( options . pubClient && options . subClient ) { return createAdapter ( options ) ; } throw new Error ( 'error socket adapter options' ) ; }