elmish


Cmd

Core abstractions for dispatching messages in Elmish.

  1: 
  2: 
  3: 
  4: 
  5: 
  6: 
  7: 
  8: 
  9: 
 10: 
 11: 
 12: 
 13: 
 14: 
 15: 
 16: 
 17: 
 18: 
 19: 
 20: 
 21: 
 22: 
 23: 
 24: 
 25: 
 26: 
 27: 
 28: 
 29: 
 30: 
 31: 
 32: 
 33: 
 34: 
 35: 
 36: 
 37: 
 38: 
 39: 
 40: 
 41: 
 42: 
 43: 
 44: 
 45: 
 46: 
 47: 
 48: 
 49: 
 50: 
 51: 
 52: 
 53: 
 54: 
 55: 
 56: 
 57: 
 58: 
 59: 
 60: 
 61: 
 62: 
 63: 
 64: 
 65: 
 66: 
 67: 
 68: 
 69: 
 70: 
 71: 
 72: 
 73: 
 74: 
 75: 
 76: 
 77: 
 78: 
 79: 
 80: 
 81: 
 82: 
 83: 
 84: 
 85: 
 86: 
 87: 
 88: 
 89: 
 90: 
 91: 
 92: 
 93: 
 94: 
 95: 
 96: 
 97: 
 98: 
 99: 
100: 
101: 
102: 
103: 
104: 
105: 
106: 
107: 
108: 
109: 
110: 
111: 
112: 
113: 
114: 
115: 
116: 
117: 
118: 
119: 
120: 
121: 
122: 
123: 
124: 
125: 
126: 
127: 
128: 
129: 
130: 
131: 
132: 
133: 
134: 
135: 
136: 
137: 
138: 
139: 
140: 
141: 
142: 
143: 
144: 
145: 
146: 
147: 
148: 
149: 
150: 
151: 
152: 
153: 
154: 
155: 
156: 
157: 
158: 
159: 
160: 
161: 
162: 
163: 
164: 
165: 
166: 
167: 
168: 
169: 
170: 
171: 
172: 
173: 
174: 
175: 
176: 
177: 
178: 
179: 
180: 
181: 
182: 
183: 
184: 
185: 
186: 
187: 
188: 
189: 
190: 
191: 
192: 
193: 
194: 
195: 
196: 
197: 
198: 
199: 
200: 
201: 
202: 
203: 
204: 
205: 
206: 
207: 
208: 
209: 
210: 
211: 
212: 
213: 
214: 
215: 
216: 
217: 
218: 
219: 
220: 
221: 
222: 
223: 
224: 
225: 
226: 
227: 
228: 
229: 
230: 
231: 
232: 
233: 
234: 
235: 
236: 
237: 
238: 
239: 
240: 
241: 
242: 
243: 
244: 
245: 
246: 
247: 
248: 
249: 
250: 
251: 
252: 
253: 
254: 
255: 
256: 
257: 
258: 
259: 
260: 
261: 
262: 
263: 
264: 
265: 
266: 
267: 
268: 
269: 
270: 
271: 
272: 
273: 
274: 
275: 
276: 
277: 
278: 
279: 
280: 
281: 
282: 
283: 
284: 
285: 
286: 
287: 
namespace Elmish

open System

/// Dispatch - feed new message into the processing loop
type Dispatch<'msg> = 'msg -> unit

/// Subscription - return immediately, but may schedule dispatch of a message at any time
type Sub<'msg> = Dispatch<'msg> -> unit

/// Cmd - container for subscriptions that may produce messages
type Cmd<'msg> = Sub<'msg> list

/// Cmd module for creating and manipulating commands
[<RequireQualifiedAccess>]
module Cmd =
    /// Execute the commands using the supplied dispatcher
    let internal exec (dispatch:Dispatch<'msg>) (cmd:Cmd<'msg>) =
        cmd |> List.iter (fun sub -> sub dispatch)

    /// None - no commands, also known as `[]`
    let none : Cmd<'msg> =
        []

    /// When emitting the message, map to another type
    let map (f: 'a -> 'msg) (cmd: Cmd<'a>) : Cmd<'msg> =
        cmd |> List.map (fun g -> (fun dispatch -> f >> dispatch) >> g)

    /// Aggregate multiple commands
    let batch (cmds: #seq<Cmd<'msg>>) : Cmd<'msg> =
        cmds |> List.concat

    /// Command to call the subscriber
    let ofSub (sub: Sub<'msg>) : Cmd<'msg> =
        [sub]

    module OfFunc =
        /// Command to evaluate a simple function and map the result
        /// into success or error (of exception)
        let either (task: 'a -> _) (arg: 'a) (ofSuccess: _ -> 'msg) (ofError: _ -> 'msg) : Cmd<'msg> =
            let bind dispatch =
                try
                    task arg
                    |> (ofSuccess >> dispatch)
                with x ->
                    x |> (ofError >> dispatch)
            [bind]

        /// Command to evaluate a simple function and map the success to a message
        /// discarding any possible error
        let perform (task: 'a -> _) (arg: 'a) (ofSuccess: _ -> 'msg) : Cmd<'msg> =
            let bind dispatch =
                try
                    task arg
                    |> (ofSuccess >> dispatch)
                with x ->
                    ()
            [bind]

        /// Command to evaluate a simple function and map the error (in case of exception)
        let attempt (task: 'a -> unit) (arg: 'a) (ofError: _ -> 'msg) : Cmd<'msg> =
            let bind dispatch =
                try
                    task arg
                with x ->
                    x |> (ofError >> dispatch)
            [bind]

        /// Command to issue a specific message
        let result (msg:'msg) : Cmd<'msg> =
            [fun dispatch -> dispatch msg]

    module OfAsyncWith =
        /// Command that will evaluate an async block and map the result
        /// into success or error (of exception)
        let either (start: Async<unit> -> unit) 
                   (task: 'a -> Async<_>)
                   (arg: 'a)
                   (ofSuccess: _ -> 'msg)
                   (ofError: _ -> 'msg) : Cmd<'msg> =
            let bind dispatch =
                async {
                    let! r = task arg |> Async.Catch
                    dispatch (match r with
                             | Choice1Of2 x -> ofSuccess x
                             | Choice2Of2 x -> ofError x)
                }
            [bind >> start]

        /// Command that will evaluate an async block and map the success
        let perform (start: Async<unit> -> unit) 
                    (task: 'a -> Async<_>)
                    (arg: 'a)
                    (ofSuccess: _ -> 'msg) : Cmd<'msg> =
            let bind dispatch =
                async {
                    let! r = task arg |> Async.Catch
                    match r with
                    | Choice1Of2 x -> dispatch (ofSuccess x)
                    | _ -> ()
                }
            [bind >> start]

        /// Command that will evaluate an async block and map the error (of exception)
        let attempt (start: Async<unit> -> unit) 
                    (task: 'a -> Async<_>)
                    (arg: 'a)
                    (ofError: _ -> 'msg) : Cmd<'msg> =
            let bind dispatch =
                async {
                    let! r = task arg |> Async.Catch
                    match r with
                    | Choice2Of2 x -> dispatch (ofError x)
                    | _ -> ()
                }
            [bind >> start]

        /// Command that will evaluate an async block to the message
        let result (start: Async<unit> -> unit) 
                   (task: Async<'msg>) : Cmd<'msg> =
            let bind dispatch =
                async {
                    let! r = task |> Async.Catch
                    match r with
                    | Choice1Of2 x -> dispatch x
                    | _ -> ()
                }
            [bind >> start]

    module OfAsync =
#if FABLE_COMPILER
        let start x = Timer.delay 0 (fun _ -> Async.StartImmediate x)
#else
        let inline start x = Async.Start x
#endif    
        /// Command that will evaluate an async block and map the result
        /// into success or error (of exception)
        let inline either (task: 'a -> Async<_>)
                          (arg: 'a)
                          (ofSuccess: _ -> 'msg)
                          (ofError: _ -> 'msg) : Cmd<'msg> =
            OfAsyncWith.either start task arg ofSuccess ofError

        /// Command that will evaluate an async block and map the success
        let inline perform (task: 'a -> Async<_>)
                           (arg: 'a)
                           (ofSuccess: _ -> 'msg) : Cmd<'msg> =
            OfAsyncWith.perform start task arg ofSuccess

        /// Command that will evaluate an async block and map the error (of exception)
        let inline attempt (task: 'a -> Async<_>)
                           (arg: 'a)
                           (ofError: _ -> 'msg) : Cmd<'msg> =
            OfAsyncWith.attempt start task arg ofError

        /// Command that will evaluate an async block to the message
        let inline result (task: Async<'msg>) : Cmd<'msg> =
            OfAsyncWith.result start task

    module OfAsyncImmediate =
        /// Command that will evaluate an async block and map the result
        /// into success or error (of exception)
        let inline either (task: 'a -> Async<_>)
                          (arg: 'a)
                          (ofSuccess: _ -> 'msg)
                          (ofError: _ -> 'msg) : Cmd<'msg> =
            OfAsyncWith.either Async.StartImmediate task arg ofSuccess ofError

        /// Command that will evaluate an async block and map the success
        let inline perform (task: 'a -> Async<_>)
                           (arg: 'a)
                           (ofSuccess: _ -> 'msg) : Cmd<'msg> =
            OfAsyncWith.perform Async.StartImmediate task arg ofSuccess

        /// Command that will evaluate an async block and map the error (of exception)
        let inline attempt (task: 'a -> Async<_>)
                           (arg: 'a)
                           (ofError: _ -> 'msg) : Cmd<'msg> =
            OfAsyncWith.attempt Async.StartImmediate task arg ofError

        /// Command that will evaluate an async block to the message
        let inline result (task: Async<'msg>) : Cmd<'msg> =
            OfAsyncWith.result Async.StartImmediate task

#if FABLE_COMPILER
    module OfPromise =
        /// Command to call `promise` block and map the results
        let either (task: 'a -> Fable.Core.JS.Promise<_>)
                   (arg:'a)
                   (ofSuccess: _ -> 'msg)
                   (ofError: #exn -> 'msg) : Cmd<'msg> =
            let bind dispatch =
                (task arg)
                    .``then``(ofSuccess >> dispatch)
                    .catch(unbox >> ofError >> dispatch)
                    |> ignore
            [bind]

        /// Command to call `promise` block and map the success
        let perform (task: 'a -> Fable.Core.JS.Promise<_>)
                   (arg:'a)
                   (ofSuccess: _ -> 'msg) =
            let bind dispatch =
                (task arg)
                    .``then``(ofSuccess >> dispatch)
                    |> ignore
            [bind]

        /// Command to call `promise` block and map the error
        let attempt (task: 'a -> Fable.Core.JS.Promise<_>)
                    (arg:'a)
                    (ofError: #exn -> 'msg) : Cmd<'msg> =
            let bind dispatch =
                (task arg)
                    .catch(unbox >> ofError >> dispatch)
                    |> ignore
            [bind]

        /// Command to dispatch the `promise` result
        let result (task: Fable.Core.JS.Promise<'msg>) =
            let bind dispatch =
                task.``then`` dispatch
                |> ignore
            [bind]

    [<Obsolete("Use `OfPromise.either` instead")>]
    let inline ofPromise (task: 'a -> Fable.Core.JS.Promise<_>)
                         (arg:'a)
                         (ofSuccess: _ -> 'msg)
                         (ofError: _ -> 'msg) : Cmd<'msg> =
        OfPromise.either task arg ofSuccess ofError                     
#else
    open System.Threading.Tasks
    module OfTask =
        /// Command to call a task and map the results
        let inline either (task: 'a -> Task<_>)
                          (arg:'a)
                          (ofSuccess: _ -> 'msg)
                          (ofError: _ -> 'msg) : Cmd<'msg> =
            OfAsync.either (task >> Async.AwaitTask) arg ofSuccess ofError

        /// Command to call a task and map the success
        let inline perform (task: 'a -> Task<_>)
                           (arg:'a)
                           (ofSuccess: _ -> 'msg) : Cmd<'msg> =
            OfAsync.perform (task >> Async.AwaitTask) arg ofSuccess

        /// Command to call a task and map the error
        let inline attempt (task: 'a -> Task<_>)
                           (arg:'a)
                           (ofError: _ -> 'msg) : Cmd<'msg> =
            OfAsync.attempt (task >> Async.AwaitTask) arg ofError

        /// Command and map the task success
        let inline result (task: Task<'msg>) : Cmd<'msg> =
            OfAsync.result (task |> Async.AwaitTask)

    [<Obsolete("Use OfTask.either instead")>]
    let inline ofTask (task: 'a -> Task<_>)
                      (arg:'a)
                      (ofSuccess: _ -> 'msg)
                      (ofError: _ -> 'msg) : Cmd<'msg> =
        OfTask.either task arg ofSuccess ofError
#endif

    // Synonymous with `OfFunc.result`, may be removed in the future
    let inline ofMsg (msg:'msg) : Cmd<'msg> =
        OfFunc.result msg

    [<Obsolete("Use `Cmd.OfAsync.either` instead")>]
    let inline ofAsync (task: 'a -> Async<_>)
                       (arg: 'a)
                       (ofSuccess: _ -> 'msg)
                       (ofError: _ -> 'msg) : Cmd<'msg> =
        OfAsync.either task arg ofSuccess ofError

    [<Obsolete("Use `Cmd.OfFunc.either` instead")>]
    let inline ofFunc (task: 'a -> _) (arg: 'a) (ofSuccess: _ -> 'msg) (ofError: _ -> 'msg) : Cmd<'msg> =
        OfFunc.either task arg ofSuccess ofError

    [<Obsolete("Use `Cmd.OfFunc.perform` instead")>]
    let inline performFunc (task: 'a -> _) (arg: 'a) (ofSuccess: _ -> 'msg) : Cmd<'msg> =
        OfFunc.perform task arg ofSuccess

    [<Obsolete("Use `Cmd.OfFunc.attempt` instead")>]
    let attemptFunc (task: 'a -> unit) (arg: 'a) (ofError: _ -> 'msg) : Cmd<'msg> =
        OfFunc.attempt task arg ofError
namespace System
type Dispatch<'msg> = 'msg -> unit


 Dispatch - feed new message into the processing loop
type unit = Unit
type Sub<'msg> = Dispatch<'msg> -> unit


 Subscription - return immediately, but may schedule dispatch of a message at any time
type Cmd<'msg> = Sub<'msg> list


 Cmd - container for subscriptions that may produce messages
type 'T list = List<'T>
Multiple items
type RequireQualifiedAccessAttribute =
  inherit Attribute
  new : unit -> RequireQualifiedAccessAttribute

--------------------
new : unit -> RequireQualifiedAccessAttribute
Multiple items
module Cmd

from Elmish


 Cmd module for creating and manipulating commands


--------------------
type Cmd<'msg> = Sub<'msg> list


 Cmd - container for subscriptions that may produce messages
val internal exec : dispatch:Dispatch<'msg> -> cmd:Cmd<'msg> -> unit


 Execute the commands using the supplied dispatcher
val dispatch : Dispatch<'msg>
val cmd : Cmd<'msg>
Multiple items
module List

from Microsoft.FSharp.Collections

--------------------
type List<'T> =
  | ( [] )
  | ( :: ) of Head: 'T * Tail: 'T list
    interface IReadOnlyList<'T>
    interface IReadOnlyCollection<'T>
    interface IEnumerable
    interface IEnumerable<'T>
    member GetSlice : startIndex:int option * endIndex:int option -> 'T list
    member Head : 'T
    member IsEmpty : bool
    member Item : index:int -> 'T with get
    member Length : int
    member Tail : 'T list
    ...
val iter : action:('T -> unit) -> list:'T list -> unit
val sub : Sub<'msg>
val none : Cmd<'msg>


 None - no commands, also known as `[]`
val map : f:('a -> 'msg) -> cmd:Cmd<'a> -> Cmd<'msg>


 When emitting the message, map to another type
val f : ('a -> 'msg)
val cmd : Cmd<'a>
val map : mapping:('T -> 'U) -> list:'T list -> 'U list
val g : Sub<'a>
val batch : cmds:#seq<Cmd<'msg>> -> Cmd<'msg>


 Aggregate multiple commands
val cmds : #seq<Cmd<'msg>>
Multiple items
val seq : sequence:seq<'T> -> seq<'T>

--------------------
type seq<'T> = Collections.Generic.IEnumerable<'T>
val concat : lists:seq<'T list> -> 'T list
val ofSub : sub:Sub<'msg> -> Cmd<'msg>


 Command to call the subscriber
val either : task:('a -> 'a0) -> arg:'a -> ofSuccess:('a0 -> 'msg) -> ofError:(exn -> 'msg) -> Cmd<'msg>


 Command to evaluate a simple function and map the result
 into success or error (of exception)
val task : ('a -> 'a0)
val arg : 'a
val ofSuccess : ('a -> 'msg)
val ofError : (exn -> 'msg)
val bind : (('msg -> 'b) -> 'b)
val dispatch : ('msg -> 'b)
val x : exn
val perform : task:('a -> 'a0) -> arg:'a -> ofSuccess:('a0 -> 'msg) -> Cmd<'msg>


 Command to evaluate a simple function and map the success to a message
 discarding any possible error
val bind : (('msg -> unit) -> unit)
val dispatch : ('msg -> unit)
val attempt : task:('a -> unit) -> arg:'a -> ofError:(exn -> 'msg) -> Cmd<'msg>


 Command to evaluate a simple function and map the error (in case of exception)
val task : ('a -> unit)
val result : msg:'msg -> Cmd<'msg>


 Command to issue a specific message
val msg : 'msg
val either : start:(Async<unit> -> unit) -> task:('a -> Async<'a0>) -> arg:'a -> ofSuccess:('a0 -> 'msg) -> ofError:(exn -> 'msg) -> Cmd<'msg>


 Command that will evaluate an async block and map the result
 into success or error (of exception)
val start : (Async<unit> -> unit)
Multiple items
type Async =
  static member AsBeginEnd : computation:('Arg -> Async<'T>) -> ('Arg * AsyncCallback * obj -> IAsyncResult) * (IAsyncResult -> 'T) * (IAsyncResult -> unit)
  static member AwaitEvent : event:IEvent<'Del,'T> * ?cancelAction:(unit -> unit) -> Async<'T> (requires delegate and 'Del :> Delegate)
  static member AwaitIAsyncResult : iar:IAsyncResult * ?millisecondsTimeout:int -> Async<bool>
  static member AwaitTask : task:Task -> Async<unit>
  static member AwaitTask : task:Task<'T> -> Async<'T>
  static member AwaitWaitHandle : waitHandle:WaitHandle * ?millisecondsTimeout:int -> Async<bool>
  static member CancelDefaultToken : unit -> unit
  static member Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
  static member Choice : computations:seq<Async<'T option>> -> Async<'T option>
  static member FromBeginEnd : beginAction:(AsyncCallback * obj -> IAsyncResult) * endAction:(IAsyncResult -> 'T) * ?cancelAction:(unit -> unit) -> Async<'T>
  ...

--------------------
type Async<'T> =
val task : ('a -> Async<'a0>)
val bind : (('msg -> unit) -> Async<unit>)
val async : AsyncBuilder
val r : Choice<'a,exn>
static member Async.Catch : computation:Async<'T> -> Async<Choice<'T,exn>>
union case Choice.Choice1Of2: 'T1 -> Choice<'T1,'T2>
val x : 'a
union case Choice.Choice2Of2: 'T2 -> Choice<'T1,'T2>
val perform : start:(Async<unit> -> unit) -> task:('a -> Async<'a0>) -> arg:'a -> ofSuccess:('a0 -> 'msg) -> Cmd<'msg>


 Command that will evaluate an async block and map the success
val attempt : start:(Async<unit> -> unit) -> task:('a -> Async<'a0>) -> arg:'a -> ofError:(exn -> 'msg) -> Cmd<'msg>


 Command that will evaluate an async block and map the error (of exception)
val result : start:(Async<unit> -> unit) -> task:Async<'msg> -> Cmd<'msg>


 Command that will evaluate an async block to the message
val task : Async<'msg>
val r : Choice<'msg,exn>
val x : 'msg
val start : x:Async<unit> -> unit
val x : Async<unit>
static member Async.Start : computation:Async<unit> * ?cancellationToken:Threading.CancellationToken -> unit
val either : task:('a -> Async<'a0>) -> arg:'a -> ofSuccess:('a0 -> 'msg) -> ofError:(exn -> 'msg) -> Cmd<'msg>


 Command that will evaluate an async block and map the result
 into success or error (of exception)
module OfAsyncWith

from Elmish.Cmd
val perform : task:('a -> Async<'a0>) -> arg:'a -> ofSuccess:('a0 -> 'msg) -> Cmd<'msg>


 Command that will evaluate an async block and map the success
val attempt : task:('a -> Async<'a0>) -> arg:'a -> ofError:(exn -> 'msg) -> Cmd<'msg>


 Command that will evaluate an async block and map the error (of exception)
val result : task:Async<'msg> -> Cmd<'msg>


 Command that will evaluate an async block to the message
static member Async.StartImmediate : computation:Async<unit> * ?cancellationToken:Threading.CancellationToken -> unit
namespace System.Threading
namespace System.Threading.Tasks
val either : task:('a -> Task<'a0>) -> arg:'a -> ofSuccess:('a0 -> 'msg) -> ofError:(exn -> 'msg) -> Cmd<'msg>


 Command to call a task and map the results
val task : ('a -> Task<'a0>)
Multiple items
type Task =
  new : action:Action -> Task + 7 overloads
  member AsyncState : obj
  member ConfigureAwait : continueOnCapturedContext:bool -> ConfiguredTaskAwaitable
  member ContinueWith : continuationAction:Action<Task> -> Task + 19 overloads
  member CreationOptions : TaskCreationOptions
  member Dispose : unit -> unit
  member Exception : AggregateException
  member GetAwaiter : unit -> TaskAwaiter
  member Id : int
  member IsCanceled : bool
  ...

--------------------
type Task<'TResult> =
  inherit Task
  new : function:Func<'TResult> -> Task<'TResult> + 7 overloads
  member ConfigureAwait : continueOnCapturedContext:bool -> ConfiguredTaskAwaitable<'TResult>
  member ContinueWith : continuationAction:Action<Task<'TResult>> -> Task + 19 overloads
  member GetAwaiter : unit -> TaskAwaiter<'TResult>
  member Result : 'TResult
  static member Factory : TaskFactory<'TResult>

--------------------
Task(action: Action) : Task
Task(action: Action, cancellationToken: Threading.CancellationToken) : Task
Task(action: Action, creationOptions: TaskCreationOptions) : Task
Task(action: Action<obj>, state: obj) : Task
Task(action: Action, cancellationToken: Threading.CancellationToken, creationOptions: TaskCreationOptions) : Task
Task(action: Action<obj>, state: obj, cancellationToken: Threading.CancellationToken) : Task
Task(action: Action<obj>, state: obj, creationOptions: TaskCreationOptions) : Task
Task(action: Action<obj>, state: obj, cancellationToken: Threading.CancellationToken, creationOptions: TaskCreationOptions) : Task

--------------------
Task(function: Func<'TResult>) : Task<'TResult>
Task(function: Func<'TResult>, cancellationToken: Threading.CancellationToken) : Task<'TResult>
Task(function: Func<'TResult>, creationOptions: TaskCreationOptions) : Task<'TResult>
Task(function: Func<obj,'TResult>, state: obj) : Task<'TResult>
Task(function: Func<'TResult>, cancellationToken: Threading.CancellationToken, creationOptions: TaskCreationOptions) : Task<'TResult>
Task(function: Func<obj,'TResult>, state: obj, cancellationToken: Threading.CancellationToken) : Task<'TResult>
Task(function: Func<obj,'TResult>, state: obj, creationOptions: TaskCreationOptions) : Task<'TResult>
Task(function: Func<obj,'TResult>, state: obj, cancellationToken: Threading.CancellationToken, creationOptions: TaskCreationOptions) : Task<'TResult>
module OfAsync

from Elmish.Cmd
static member Async.AwaitTask : task:Task -> Async<unit>
static member Async.AwaitTask : task:Task<'T> -> Async<'T>
val perform : task:('a -> Task<'a0>) -> arg:'a -> ofSuccess:('a0 -> 'msg) -> Cmd<'msg>


 Command to call a task and map the success
val attempt : task:('a -> Task<'a0>) -> arg:'a -> ofError:(exn -> 'msg) -> Cmd<'msg>


 Command to call a task and map the error
val result : task:Task<'msg> -> Cmd<'msg>


 Command and map the task success
val task : Task<'msg>
Multiple items
type ObsoleteAttribute =
  inherit Attribute
  new : unit -> ObsoleteAttribute + 2 overloads
  member IsError : bool
  member Message : string

--------------------
ObsoleteAttribute() : ObsoleteAttribute
ObsoleteAttribute(message: string) : ObsoleteAttribute
ObsoleteAttribute(message: string, error: bool) : ObsoleteAttribute
module OfTask

from Elmish.Cmd
val ofMsg : msg:'msg -> Cmd<'msg>
module OfFunc

from Elmish.Cmd