partey_workadventure/front/src/Connexion/WorldFullMessageStream.ts
2021-09-06 14:31:59 +02:00

13 lines
337 B
TypeScript

import { Subject } from "rxjs";
class WorldFullMessageStream {
private _stream: Subject<string | null> = new Subject<string | null>();
public stream = this._stream.asObservable();
onMessage(message?: string) {
this._stream.next(message);
}
}
export const worldFullMessageStream = new WorldFullMessageStream();