MockOperationHandler type alias

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

type MockOperationHandler = (state: MockState, input: unknown, operation: MockOperation) => MockOperationOutcome | void | Promise<MockOperationOutcome | void>;

Runs a started operation with its wire input. When the returned promise resolves, a still running operation succeeds with its outcome; a throw fails it, or cancels it after the client asked to cancel, and throw mockFailure(failure) ends it domain-failed. Cancellation is cooperative: a cancel request aborts operation.signal, and the operation keeps running until its handler stops. "manual" leaves every operation running until the test settles it through MockView.operations().