//example 1
const xd = new Observable(({ next }) => {
next("3");
});
xd.subscribe(msg => console.log(msg));
//example 2
const obs$ = new Observable();
obs$.subscribe(mg => console.log(mg));
//example 3
private socket: SocketIOClient.Socket;
constructor(private url: string) {
this.socket = io(this.url);
}
listen() {
return new Observable(({ next }) => {
this.socket.on("message", next)
})
}
They are all giving me the same error, what might have gone wrong ?
(Uncaught TypeError: Cannot read property 'isStopped' of undefined)