chazsconi/elm-phoenix-ports/1.1.1

NOTE: the latest version is 2.1.0

Phoenix.Config

Defines the Config for Phoenix

Definition

type alias Config msg =
{ parentMsg : Msg msg -> msg
, debug : Bool
, ports : Maybe (Ports msg)
}

The config for Phoenix

Helpers

new : (Msg msg -> msg) -> Ports msg -> Config msg

Creates a new config

withDebug : Config msg -> Config msg

Enable debug logs. Every incoming and outgoing message will be printed.

map : (Msg b -> b) -> Config a -> Config b

Maps the config. The ports is not mapped as it is only needed at the top level update/subscriptions