Program configuration
Internal.Cmd.Cmd msg
Wrapper around the vanilla Elm Cmd for internal communication.
When mounting an application via Config.routes, your app should use this type instead of Platform.Cmd, then it's just matter of using wrap to wrap the Cmd.
PostgRestAdmin.Client speaks this language.
wrap : Platform.Cmd.Cmd msg -> Cmd msg
Wraps the Platform.Cmd.
import Time exposing (Posix)
getNewTime : (Posix -> Msg) -> PostgRestAdmin.Cmd Msg
getNewTime tagger =
Task.perform tagger Time.now
|> PostgRestAdmin.Cmd.wrap
none : Cmd msg
Do nothing.
wrap Platform.Cmd.none == none
batch : List (Cmd msg) -> Cmd msg
Pass a bunch of commands to the runtime, execution order is not guaranteed.
Equivalent to Platform.Cmd.batch.
map : (a -> b) -> Cmd a -> Cmd b
Transform the messages produced by a command.
Equivalent to Platform.Cmd.map.