mirror of
https://github.com/avatao-content/frontend-tutorial-framework
synced 2025-07-12 15:06:23 +00:00
Make type hierarchy from messages
This commit is contained in:
@ -7,6 +7,7 @@ import { ProcessLogCommand } from '../message.types/process.log.command';
|
||||
import { config } from '../config';
|
||||
import { BehaviorSubject } from 'rxjs/BehaviorSubject';
|
||||
import { LogMessage } from '../message.types/log.message';
|
||||
import { CommandMessage } from '../message.types/command.message';
|
||||
|
||||
@Injectable()
|
||||
export class ProcessLogService {
|
||||
@ -19,7 +20,7 @@ export class ProcessLogService {
|
||||
|
||||
constructor(private webSocketService: WebSocketService) {
|
||||
this.webSocketService.connect();
|
||||
this.webSocketService.observeKey<ProcessLogCommand>('processlog').subscribe(
|
||||
this.webSocketService.observeKey<CommandMessage>('processlog').subscribe(
|
||||
(event) => this.command_handlers[event.data.command](event.data)
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user