Vlad GURDIGA
Vlad GURDIGA
[I was sketching out some Elm](%28https://github.com/gurdiga/elm-play/blob/d4e9a57b66b90452b0649ea888dc9ba269d48a11/PersonSection.elm#L63-L67%29) this morning and stumbled upon this nuance myself: strings are easy to mistype. π€ So yes: How to avoid [hard-coding strings in conditionals](https://github.com/evancz/elm-todomvc/blob/8f56bb47a711137d1aa13edd80b2faf4603b594d/Todo.elm#L256-L263) like...
Iβve tried (https://github.com/gurdiga/elm-todomvc/commit/8977837b0e35458323bfddc79fe63cac9f019d5f) to replace hardcoded strings with a `Visibility` union type and almost got there π€: ``` ~/tmp/elm-todomvc Ο elm make Todo.elm -- BAD FLAGS ---------------------------------------------------------- Todo.elm Your `main`...
@mez Haha! Very neat approach here: https://github.com/mez/elm-todo/blob/master/Todo.elm#L198-L207! π Thank you for sharing!
You can probably open Futon (/_utils) and have a look what's going on there and figure out what's not right.
I think itβs safe to assume a string. π€