Gorka CesiumG
Convex Community2y ago
6 replies
Gorka Cesium

recursive type

I'm trying to declare a dynamic tree structure for layouts (similar to HTML). Is it possible to have a recursive type? I'm trying this
let element_eurofutur = v.union(v.literal("Row"), v.literal("Col"), v.literal("Hoja"),   v.literal("Fijo"), v.literal("Poste") ); 

let node_eurofutur = v.object({   
   element: element_eurofutur,
   children: v.array(node_eurofutur) 
});


but getting error
Block-scoped variable 'node_eurofutur' used before its declaration.
Was this page helpful?