From e595b0ccc1159e389ed61e43ef748252a01983fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krist=C3=B3f=20T=C3=B3th?= Date: Wed, 7 Mar 2018 17:14:30 +0100 Subject: [PATCH] Replace any with actual type in ProcessManagerService --- src/app/services/processmanager.service.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/app/services/processmanager.service.ts b/src/app/services/processmanager.service.ts index 80b8544..f8d289c 100644 --- a/src/app/services/processmanager.service.ts +++ b/src/app/services/processmanager.service.ts @@ -3,6 +3,7 @@ import { Injectable } from '@angular/core'; import { WebSocketService } from './websocket.service'; import { ProcessCommand } from './processcommand'; import { filter } from 'rxjs/operators'; +import { WSMessage } from './wsmessage'; @Injectable() @@ -16,11 +17,11 @@ export class ProcessManagerService { this.webSocketService.connect(); } - subscribeCallback(process_name: string, callback: (event: any) => void) { + subscribeCallback(process_name: string, callback: (event: WSMessage) => void) { this.observeProcessMessage(process_name).subscribe(callback); } - subscribeErrorCallback(process_name: string, callback: (event: any) => void) { + subscribeErrorCallback(process_name: string, callback: (event: WSMessage) => void) { this.observeProcessMessage(process_name).pipe(filter(message => 'error' in message.data)).subscribe(callback); }