chore(tree-view): add test for types

This commit is contained in:
Eric Y Liu 2021-07-05 05:15:31 -07:00
commit 775b80de3e
6 changed files with 80 additions and 34 deletions

View file

@ -11842,7 +11842,7 @@
"name": "children",
"kind": "let",
"description": "Provide an array of children nodes to render",
"type": "TreeNode & { children?: TreeNode[] }",
"type": "Array<TreeNode & { children?: TreeNode[] }>",
"value": "[]",
"isFunction": false,
"constant": false,
@ -11858,21 +11858,11 @@
"constant": false,
"reactive": true
},
{
"name": "multiselect",
"kind": "let",
"description": "Set to `true` to allow multiple selected nodes",
"type": "boolean",
"value": "false",
"isFunction": false,
"constant": false,
"reactive": false
},
{
"name": "selectedIds",
"kind": "let",
"description": "Set the node ids to be selected",
"type": "TreeNodeIds",
"type": "TreeNodeId[]",
"value": "[]",
"isFunction": false,
"constant": false,
@ -11942,9 +11932,9 @@
"ts": "type TreeNodeId = string | number"
},
{
"type": "{ id: TreeNodeId; text: string; disabled?: boolean; }",
"type": "{ id: TreeNodeId; text: string; icon?: typeof import(\"carbon-icons-svelte\").CarbonIcon; disabled?: boolean; expanded?: boolean; }",
"name": "TreeNode",
"ts": "interface TreeNode { id: TreeNodeId; text: string; disabled?: boolean; }"
"ts": "interface TreeNode { id: TreeNodeId; text: string; icon?: typeof import(\"carbon-icons-svelte\").CarbonIcon; disabled?: boolean; expanded?: boolean; }"
}
],
"rest_props": { "type": "Element", "name": "ul" }