Fork me on GitHub
#malli
<
2022-05-19
>
armed11:05:57

Hey, everyone. What’s the best way to describe homogeneous map but add specific keys in it?

armed11:05:39

I tried :union and :and with no luck.

armed11:05:02

(mu/union
   [:map
    [:state keyword?]
    [:failure {:optional true} any?]
    [:value any?]]
   [:map-of keyword? string?])

armed11:05:04

Well, actually it’s working. Had to replace :union with mu/union 🙂

ikitommi13:05:39

good to hear it works! I think union puts :or around the two here.

ikitommi13:05:01

:thinking_face:

ikitommi13:05:41

but, there is an issue to solve this elegantly.

aaron5122:05:29

Seems like pretty/explain doesn’t support custom registries?

1