partey_workadventure/front/src/Connexion/WorldFullMessageStream.ts

13 lines
337 B
TypeScript
Raw Normal View History

2021-09-06 14:27:54 +02:00
import { Subject } from "rxjs";
class WorldFullMessageStream {
2021-09-06 14:27:54 +02:00
private _stream: Subject<string | null> = new Subject<string | null>();
public stream = this._stream.asObservable();
2021-09-06 14:27:54 +02:00
onMessage(message?: string) {
this._stream.next(message);
}
}
2021-09-06 14:27:54 +02:00
export const worldFullMessageStream = new WorldFullMessageStream();