export interface SharedWebSockets { [ url ] : WebSocket | undefined ; } export enum ReadyState { UNINSTANTIATED = - 1 , CONNECTING = 0 , OPEN = 1 , CLOSING = 2 , CLOSED = 3 } const dataTypes = [ '[object String]' , '[object ArrayBuffer]' , '[object SharedArrayBuffer]' , '[object Blob]' , '[object Object]' , ] ; export const sharedWebSockets = { } ; export const getType = ( value ) : string => { return Object . prototype . toString . call ( value ) ; } ; export const isValidData = ( type ) : boolean => { return dataTypes . includes ( type ) ; } ;