Replies: 3 comments 6 replies
-
Could use a local registry. Then the non dry one is much shorter. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Maybe just mark the keys as optional? |
Beta Was this translation helpful? Give feedback.
3 replies
-
there is an existing discussion in this issue: #474 |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Context: I want to spec a contact map, which can contain either an email address, a phone number, or both. But containing neither is invalid.
I currently have:
which is not very DRY. I'm guessing that I can do better. Any help appreciated.
I know I can use a fn predicate, as in:
but am wondering if I can do it without using a fn predicate.
thanks
Beta Was this translation helpful? Give feedback.
All reactions