Add typescript

This commit is contained in:
2020-08-21 11:32:09 +02:00
parent 2865f8eb07
commit 8378b34263
5 changed files with 61 additions and 8 deletions

View File

@@ -45,12 +45,21 @@ const ICONS = {
class ScriptGraph extends LitElement {
static get properties() {
return {
tree: {},
selected: {},
};
}
/*
* GOAL:
* Tree Node Structure
* {
* icon: svg,
* end: false
* children: [[TreeNode],...]
* click: callback,undefined
* add: callback,undefined
* }
*/
@property() selected = undefined;
@property() tree;
_select(idx) {
this.selected = idx;