Make type hierarchy from messages

This commit is contained in:
Kristóf Tóth
2018-05-31 12:02:53 +02:00
parent e510fb58f6
commit 887a81ab8e
12 changed files with 51 additions and 37 deletions

View File

@ -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)
);
}