1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-06 10:33:57 +00:00

getAllNested for collections too. added treenodeobject interface

This commit is contained in:
Kyle Spearrin
2018-10-25 12:09:22 -04:00
parent 6aba4550a4
commit 59f0549072
7 changed files with 70 additions and 39 deletions

View File

@@ -1,8 +1,14 @@
export class TreeNode<T> {
export class TreeNode<T extends ITreeNodeObject> {
node: T;
children: Array<TreeNode<T>> = [];
constructor(node: T) {
constructor(node: T, name: string) {
this.node = node;
this.node.name = name;
}
}
export interface ITreeNodeObject {
id: string;
name: string;
}