All Downloads are FREE. Search and download functionalities are using the official Maven repository.

elm.unionDecoder.mustache Maven / Gradle / Ivy

There is a newer version: 7.8.0
Show newest version
{{vendorExtensions.x-decoder}} : Decoder {{vendorExtensions.x-union-type}}
{{vendorExtensions.x-decoder}} =
    Decode.string
        |> Decode.andThen (\str ->
            case str of
{{#allowableValues}}
{{#enumVars}}
                {{{value}}} ->
                    Decode.succeed {{name}}

{{/enumVars}}
{{/allowableValues}}
                other ->
                    Decode.fail <| "Unknown type: " ++ other
        )




© 2015 - 2024 Weber Informatics LLC | Privacy Policy