Hello,
I’d like to use Html.programWithFlags
to pass a JS object to Elm. I figured that a Dict
type best represents what I’m passing to Elm, but I got across this message when trying to make it work:
Your `main` is demanding an unsupported type as a flag.
The specific unsupported type is:
Dict String String
The types of values that can flow through in and out of Elm include:
Ints, Floats, Bools, Strings, Maybes, Lists, Arrays, Tuples, Json.Values,
and concrete records.
Here is the code: https://ellie-app.com/32gqyWf5V5Va1
The flags I’m passing is an object with lots of keys, holding translations (strings). Using a Dict would be convenient since I don’t want to list every single field as String in Elm (is this bad practice?).
What’s the best way to solve this? Thanks!