eco-pro / elm-phoenix-ports / Phoenix.Config

Defines the Config for Phoenix

Definition


type alias Config msg =
{ parentMsg : Phoenix.Internal.Types.Msg msg -> msg
, debug : Basics.Bool
, ports : Maybe (Phoenix.PortsAPI.Ports msg) 
}

The config for Phoenix

Helpers

new : (Phoenix.Internal.Types.Msg msg -> msg) -> Phoenix.PortsAPI.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 : (Phoenix.Internal.Types.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