Introduce some functional programming techniques

This commit is contained in:
Dolan
2018-11-02 02:51:57 +00:00
parent 9cfd835171
commit 7980f14efb
108 changed files with 749 additions and 659 deletions

View File

@ -4,8 +4,9 @@ import { IXmlableObject } from "./xmlable-object";
export type AttributeMap<T> = { [P in keyof T]: string };
export abstract class XmlAttributeComponent<T> extends BaseXmlComponent {
// tslint:disable-next-line:readonly-keyword
protected root: T;
protected xmlKeys: AttributeMap<T>;
protected readonly xmlKeys: AttributeMap<T>;
constructor(properties: T) {
super("_attr");