diff --git a/packages/core/useAsyncState/index.md b/packages/core/useAsyncState/index.md index 63f7ec4b5e6b..c95e02999977 100644 --- a/packages/core/useAsyncState/index.md +++ b/packages/core/useAsyncState/index.md @@ -44,7 +44,7 @@ export interface AsyncStateOptions { /** * Callback when error is caught. */ - onError?: (e: Error) => void + onError?: (e: unknown) => void /** * Sets the state to initialState before executing the promise. * diff --git a/packages/core/useAsyncState/index.ts b/packages/core/useAsyncState/index.ts index 0028b0bab9ab..13a99051cc62 100644 --- a/packages/core/useAsyncState/index.ts +++ b/packages/core/useAsyncState/index.ts @@ -22,7 +22,7 @@ export interface AsyncStateOptions { /** * Callback when error is caught. */ - onError?: (e: Error) => void + onError?: (e: unknown) => void /** * Sets the state to initialState before executing the promise. @@ -59,7 +59,7 @@ export function useAsyncState( const state = shallowRef(initialState) const isReady = ref(false) - const error = ref(undefined) + const error = ref(undefined) async function execute(delay = 0) { if (resetOnExecute)