Closed solnic closed 1 year ago
This adds convenient type-check shortcuts:
%{ # translates to required(:test) => type(:string) required(:test) => string(), # translates to required(:test) => type(:integer) required(:test) => integer(), # translates to required(:test) => type(:map) required(:test) => map() }
You can use regular predicate syntax with these shortcuts too:
%{ # translates to required(:test) => type(:string, [:filled?]) required(:test) => string(:filled?), # translates to required(:test) => type(:integer, [:even?, gt?: 2]) required(:test) => integer([:even?, gt?: 2]), # translates to required(:test) => type(:map, size?: 3) required(:test) => map(size?: 3) }
This adds convenient type-check shortcuts:
You can use regular predicate syntax with these shortcuts too: