So I have a typedef like this `Optional['AddCapabi...
# puppet
e
So I have a typedef like this
Optional['AddCapability'] => Array[String[1],1]
and I want to make it so that I could supply a single value instead of an array as an option. So easy enough
Optional['AddCapability'] => Variant[String[1] , Array[String[1],1]]
, but is there a way to generalize this to reduce repetition? Especially when it comes to things that are more complicated than
String[1]
. Something like
oneOrMore[String[1]]
. Seems like the kind of thing that should maybe be in stdlib?