def group_target
bendvy-ecs-core@0.1.0.4 · restore_graph_raw.bend:28
import bendvy-ecs-core@0.1.0.4/restore_graph_raw.bend as RestoreGraphRaw
import Base
import bendvy-ecs-core@0.1.0.4/decode_data.bend as D
import bendvy-ecs-core@0.1.0.4/entity_key.bend as Key
import bendvy-ecs-core@0.1.0.4/restore_raw.bend as Basic
import bendvy-ecs-core@0.1.0.4/restore_graph_data.bend as Graph
28def group_target(path:String,raw:D.Raw,result:Basic.Decoded<Key.Key>) -> Basic.Decoded<Graph.Group>:
29 match raw result:
30 case _ Basic.Failed{error}:Basic.Failed{error}
31 case D.Array{sources} Basic.Value{target}:group_sources(target,keys(path,sources,0))
32 case other Basic.Value{_}:Basic.invalid(~Graph.Group,path,"array",other)