MockCommand type alias

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

type MockCommand = (state: MockState, input: unknown) => MockState | void | Promise<MockState | void>;

Runs a command with its wire input (undefined for a command without input) and returns the state changes it makes. A thrown error becomes a failed reply, an error with a kind (and reason) keeps them, and throw mockFailure(failure) replies with the declared failure (domain-failed).