This commit is contained in:
Timo Hocker 2020-05-02 21:18:32 +02:00
parent 161d4573c7
commit e0b1063df9

View File

@ -8,8 +8,17 @@
export abstract class ControlModel {
protected data: Record<string, string|number|boolean> = {};
public abstract get object(): Record<string, string|number|boolean>;
public abstract set object(obj: Record<string, string|number|boolean>);
public get object (): Record<string, string|number|boolean> {
return this.data;
}
public set object (obj: Record<string, string|number|boolean>) {
this.data = obj;
}
public constructor (obj: Record<string, string|number|boolean>) {
this.object = obj;
}
public get (key: string): string|number|boolean {
return this.data[key];