use/proxyError
Type Aliases
MaybeRefWatchableError
MaybeRefWatchableError =
MaybeRefOrGetter
A watchable error source that may itself be wrapped in a ref or getter.
Type Parameters
SeparateStateError
SeparateStateError =
object&ErrorReadOnlyFunctions
An error source whose reactive properties live under a state member, alongside its clearError action.
Type Declaration
state
state:
Reactive
Type Parameters
WatchableError
WatchableError =
ReadonlyErrorStatus|Reactive
An error source (a possibly-reactive readonly error status) that useProxyError can aggregate.
Type Parameters
Functions
asWatchableError()
asWatchableError(
source):WatchableError
Adapt an object with reactive error state into a WatchableError shape. Accepts either an object with a state property or an object that already exposes error/errored/clearError.
Parameters
source
MaybeRef<WatchableError | SeparateStateError>
The source object to adapt.
Returns
- The adapted WatchableError object.
useProxyError()
useProxyError(
errors):ReadonlyErrorStatus
A composable function for aggregating error state across multiple sources.
Parameters
errors
MaybeRefOrGetter<MaybeRefOrGetter<WatchableError>[]>
The error states to monitor.
Returns
An object containing aggregated reactive fields and actions for error state.