command function

Module @runic-artifex/views-effect in @runic-artifex/views-effect 0.23.0

function command<A>(run: () => PromiseLike<A>): Effect.Effect<CommandValue<A>, ViewError | ViewDomainFailureOf<BridgeOutcomeFailure<A>>>;

Runs a command, setter, query or checked write. Bridge failures become tagged errors; anything else, such as a RangeError for an invalid argument, is a defect. A command that declares a failure succeeds with its value and fails with ViewDomainFailure for its declared failure. Interruption abandons the reply only: .NET keeps running a command it received.

yield* command(() => editor.save());