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

@ -21,6 +21,7 @@ import { WebSocketService } from '../services/websocket.service';
import { ProcessManagerService } from '../services/processmanager.service';
import { DeploymentNotificationService } from '../services/deployment-notification.service';
import { config } from '../config';
import { CommandMessage } from '../message.types/command.message';
const modelist = brace.acequire('ace/ext/modelist');
const langTools = brace.acequire('ace/ext/language_tools');
@ -89,7 +90,7 @@ export class IdeComponent implements OnInit {
}
subscribeWS() {
this.webSocketService.observeKey<IDECommand>(this.key_id).subscribe((event) => {
this.webSocketService.observeKey<CommandMessage>(this.key_id).subscribe((event) => {
this.command_handlers[event.data.command](event.data);
this.changeDetectorRef.detectChanges();
});
@ -131,7 +132,7 @@ export class IdeComponent implements OnInit {
this.updateFileData(data);
}
reloadHandler(data: IDECommand) {
reloadHandler(data: CommandMessage) {
this.requestCode();
}
@ -141,7 +142,7 @@ export class IdeComponent implements OnInit {
}
}
writeHandler() {
writeHandler(data: CommandMessage) {
this.setCodeState(CodeState.SAVED);
}