Skip to content

Commit c901e17

Browse files
committed
Add endSimpleProgramWithCmd function.
1 parent cea2a0e commit c901e17

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

src/Node.gren

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ effect module Node where { subscription = NodeSub } exposing
99
, SimpleProgram
1010
, defineSimpleProgram
1111
, endSimpleProgram
12+
, endSimpleProgramWithCmd
1213
--
1314
, Program
1415
, ProgramConfiguration
@@ -373,6 +374,13 @@ endSimpleProgram finalTask =
373374
Internal.Init.Task (Task.succeed <| Task.execute finalTask)
374375

375376

377+
{-| Similar to [endSimpleProgram](#endSimpleProgram), but takes a `Cmd` instead of a `Task`.
378+
-}
379+
endSimpleProgramWithCmd : Cmd a -> Init.Task (Cmd a)
380+
endSimpleProgramWithCmd cmd =
381+
Internal.Init.Task (Task.succeed cmd)
382+
383+
376384
-- EXIT
377385

378386

0 commit comments

Comments
 (0)