In Elm 0.19, programWithFlags
was renamed to worker
, and
program
was removed.
program : { init : ( model, Platform.Cmd.Cmd msg ), update : msg -> model -> ( model, Platform.Cmd.Cmd msg ), subscriptions : model -> Platform.Sub.Sub msg } -> Platform.Program Basics.Never model msg
Create a [headless] program. This is great if you want to use Elm as the
“brain” for something else. You can still communicate with JS via
ports and manage your model, you just do not have to specify a view
.
programWithFlags : { init : flags -> ( model, Platform.Cmd.Cmd msg ), update : msg -> model -> ( model, Platform.Cmd.Cmd msg ), subscriptions : model -> Platform.Sub.Sub msg } -> Platform.Program flags model msg
Same as program
, but you can provide flags.