I am getting this error that Partial Custom TreeviewItem is missing following properties. The problem is that CustomTreeviewItem is Extended with Treeviewitem class which is the part of 3rd party Library.
Now the code which pushes in the array is asking for derived class properties as well.
public static FlattenTreeArray(result: CustomTreeviewItem[], list: CustomTreeviewItem[]): any[] {
_.each(list, function (item) {
result.push(_.omit(item, 'internalChildren'));
if (item['internalChildren'] && item['internalChildren'].length) {
OnixModuleHelper.FlattenTreeArray(result, item['internalChildren']);
}
});
return result;
}
I would be glad if got idea what can be done to prevent this.


