Fork me on GitHub

Slightly off-topic, but I have a question about what people would prefer in their error messages. I’d appreciate a vote if you have a minute

👌 8

Does anyone have a keys spec but for a map with string keys?


@kenny Not sure how you'd do that -- s/keys requires keywords I believe? You could use s/map-of for string keys (and add some custom predicates depending on how much checking you need)...


Yeah that's what I have. Was hoping someone had written something already that did that & generated valid values.

Alex Miller (Clojure team)23:12:39

you can get some of what you want by combining s/and and an s/conformer that keywordizes keys

Alex Miller (Clojure team)23:12:13

not sure it works on all the api operations the way you want though