import React from 'react' ; export interface ISocket { on : ( eventName : string , callback : ( data : any ) => void ) => void ; off : ( eventName : string ) => void ; } export interface ISocketContext { socket : ISocket | null ; } export const SocketContext = React . createContext < ISocketContext > ( { socket : null , } as any ) ;