You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I have IS_SANDBOX set to true in my environment, then I know that I don't need to read the SECRET_CREDENTIALS. But I know that when it's false then it's a production application that requires that secret to be defined.
Hello 馃憢
I'd like to use this library to decode some environment variables into a union type, something like this:
If I have
IS_SANDBOX
set totrue
in my environment, then I know that I don't need to read theSECRET_CREDENTIALS
. But I know that when it'sfalse
then it's a production application that requires that secret to be defined.If I were writing this in Elm then I'd want to read the
IS_SANDBOX
first, work out its value and then use that to pick which decoder I need to use, usingandThen
- https://package.elm-lang.org/packages/elm/json/latest/Json-Decode#andThen. I could also usesucceed
to produce thestatus
on the type - https://package.elm-lang.org/packages/elm/json/latest/Json-Decode#succeed.As far as I can tell, the library doesn't support this at the moment. Do you have any plans to add this?
Thanks!
The text was updated successfully, but these errors were encountered: