import { share } from 'rxjs/operators';
import { ws, client } from '@buccaneer/rxws';
const websocketParams = {
url: 'wss://mysite.com',
topics: ['message', 'news'],
};
const ws$ = ws(websocketParams).pipe(share()); // create a websocket Subject
const client$ = ws$.pipe(
client()
);
client$.subscribe(console.log);
// This would log the socket.io object