feat: add parsers for TimeWatched

This commit is contained in:
LuanRT
2022-08-24 06:13:19 -03:00
parent c000bd8d5f
commit 541cdc455f
11 changed files with 159 additions and 32 deletions

View File

@@ -0,0 +1,18 @@
class ChildElement {
static type = 'ChildElement';
text: string | null;
properties;
child_elements?: ChildElement[];
constructor(data: any) {
this.text = data.type.textType?.text?.content || null;
this.properties = data.properties;
if (data.childElements) {
this.child_elements = data.childElements.map((el: any) => new ChildElement(el));
}
}
}
export default ChildElement;