Cmd

Namespace: Bolero.Remoting.Client

Elmish commands for Async and Task jobs, remote calls and JavaScript interop.

Functions and values

Function or valueDescription
ofAuthorized f arg ofSuccess ofError
Signature: f:('req -> Async<'resp>) -> arg:'req -> ofSuccess:('resp option -> 'msg) -> ofError:(exn -> 'msg) -> Cmd<'msg>
Type parameters: 'req, 'resp, 'msg

Command that will call a remote Bolero function with authorization and map the result into successful Some if authorized, successful None if not, or error (of exception)

ofJS(...)
Signature: js:IJSRuntime -> jsFunctionName:string -> args:obj [] -> ofSuccess:('res -> 'msg) -> ofError:(exn -> 'msg) -> Cmd<'msg>
Type parameters: 'res, 'msg

Command that will perform a JavaScript interop call and map the result to a message or error (of exception)

ofRemote f arg ofSuccess ofError
Signature: f:('req -> Async<'resp>) -> arg:'req -> ofSuccess:(RemoteResponse<'resp> -> 'msg) -> ofError:(exn -> 'msg) -> Cmd<'msg>
Type parameters: 'req, 'resp, 'msg Attributes:
[<Obsolete("Use ofAsync or ofAuthorized")>]
WARNING: This API is obsolete

Use ofAsync or ofAuthorized

Command that will call a remote Bolero function with authorization and map the result into response or error (of exception)

performAsync f arg ofSuccess
Signature: f:('req -> Async<'resp>) -> arg:'req -> ofSuccess:('resp -> 'msg) -> Cmd<'msg>
Type parameters: 'req, 'resp, 'msg

Command that will evaluate an async block and map the success to a message discarding any possible error

performAuthorized f arg ofSuccess
Signature: f:('req -> Async<'resp>) -> arg:'req -> ofSuccess:('resp option -> 'msg) -> Cmd<'msg>
Type parameters: 'req, 'resp, 'msg

Command that will call a remote Bolero function with authorization and map the result into Some if authorized, None if not, discarding any possible error

performJS(...)
Signature: js:IJSRuntime -> jsFunctionName:string -> args:obj [] -> ofSuccess:('res -> 'msg) -> Cmd<'msg>
Type parameters: 'res, 'msg

Command that will perform a JavaScript interop call and map the result to a message discarding any possible error

performRemote f arg ofSuccess
Signature: f:('req -> Async<'resp>) -> arg:'req -> ofSuccess:(RemoteResponse<'resp> -> 'msg) -> Cmd<'msg>
Type parameters: 'req, 'resp, 'msg Attributes:
[<Obsolete("Use performAsync or performAuthorized")>]
WARNING: This API is obsolete

Use performAsync or performAuthorized

Command that will call a remote Bolero function with authorization and map the success to a message discarding any possible error

performTask f arg ofSuccess
Signature: f:('req -> Task<'resp>) -> arg:'req -> ofSuccess:('resp -> 'msg) -> Cmd<'msg>
Type parameters: 'req, 'resp, 'msg

Command that will evaluate a task and map the success to a message discarding any possible error