fix TreeNode type so children works recursively

This commit is contained in:
DetachHead 2022-11-29 16:52:25 +10:00 committed by detachhead
commit 3070ca6a64
2 changed files with 4 additions and 3 deletions

View file

@ -9,6 +9,7 @@ export interface TreeNode {
icon?: typeof import("svelte").SvelteComponent;
disabled?: boolean;
expanded?: boolean;
children?: TreeNode[];
}
export interface TreeViewProps
@ -17,7 +18,7 @@ export interface TreeViewProps
* Provide an array of children nodes to render
* @default []
*/
children?: Array<TreeNode & { children?: TreeNode[] }>;
children?: Array<TreeNode>;
/**
* Set the current active node id