tslint changes

This commit is contained in:
Jeremy Simpson
2019-08-30 01:52:40 -07:00
parent 7603879d35
commit 7f7efbb94b
446 changed files with 70650 additions and 70661 deletions
+23 -23
View File
@@ -4,31 +4,31 @@ import { ModelTypes } from '../common/adminInterfaces';
import { ModelSubscriber } from '../components/services/modelSubscriber';
export interface ClientUpdate {
type: ModelTypes;
id: string;
update: any;
type: ModelTypes;
id: string;
update: any;
}
export class ClientAdminActions {
constructor(private model: AdminModel) {
}
connected() {
this.model.initialize(true);
this.model.connectedToSocket();
}
disconnected() {
this.model.updateTitle();
}
@Method()
updates(updates: ClientUpdate[]) {
for (const { type, id, update } of updates) {
const model = this.model[type] as ModelSubscriber<any>;
constructor(private model: AdminModel) {
}
connected() {
this.model.initialize(true);
this.model.connectedToSocket();
}
disconnected() {
this.model.updateTitle();
}
@Method()
updates(updates: ClientUpdate[]) {
for (const { type, id, update } of updates) {
const model = this.model[type] as ModelSubscriber<any>;
if (model) {
model.update(id, update);
} else {
console.error(`Invalid model type "${type}"`);
}
}
}
if (model) {
model.update(id, update);
} else {
console.error(`Invalid model type "${type}"`);
}
}
}
}