Open janwirth opened 4 years ago
For type
type alias TextFieldAttribs =
{ defaultValue : String
, placeholder : String
, kind : TextFieldKind
, minLength : Maybe Int
, maxLength : Maybe Int
}
coder generator creates the following decoder which has incompatible semantics. Specifically it does not allow Values without minLength or maxLength fields
decodeTextFieldAttribs =
Decode.map5
TextFieldAttribs
(Decode.field "defaultValue" Decode.string)
(Decode.field "placeholder" Decode.string)
(Decode.field "kind" decodeTextFieldKind)
(Decode.field "minLength" (Decode.maybe Decode.int))
(Decode.field "maxLength" (Decode.maybe Decode.int))
@twerkmeister