useOperation function

Module @runic-artifex/vue in @runic-artifex/vue 0.23.0

function useOperation<TArgs extends readonly unknown[], TResult, TFailure = never>(start: (...args: TArgs) => BridgeOperation<TResult, TFailure> | undefined | PromiseLike<BridgeOperation<TResult, TFailure> | undefined>, options?: OperationControllerOptions<TResult, TFailure>): OperationHandle<TArgs, TResult, TFailure>;

Tracks Start admission, pending work, cancellation and terminal feedback of a generated start<Command>() operation, each state field a shallow ref, so the handle can be destructured. A run that ends cancelled sets cancelled, not error. Scope disposal settles run promises without cancelling accepted work. Call it in setup() or effectScope().run(): outside an effect scope it is never released (development builds warn). ```vue const { run: push, pending, cancelled } = useOperation((remote: string) => client.value?.startPush(remote)); <button :disabled="pending"