I have some JSON with a "type" property that I want to import into Elm. e.g., { "id": "abc", "type": "thing" }
However if I define a type alias with type
as a property, the compiler complains. e.g.,
type alias Foo = {
id: String
, type: String
}
produces
It looks like the keyword `type` is being used as a variable.
3│ , type: String
^
Rename it to something else.
Seriously? I have to rename the property? Is there no way to quote or escape it so it will compile?