export abstract class Assignable { protected data: Record = {}; public assign (da: Assignable): void { this.assign_object (da.get_data ()); } public assign_to (da: Assignable): void { da.assign (this); } public assign_object (obj: Record): void { for (const key of Object.keys (obj)) this.data[key] = obj[key]; } public get_data (): Record { return this.data; } }