vue-use-async 1.4.2 → 1.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/useMutation.d.ts +1 -1
- package/package.json +1 -1
package/dist/useMutation.d.ts
CHANGED
|
@@ -4,7 +4,7 @@ declare type TypeAllowed = undefined | boolean | null | string | number | Obj;
|
|
|
4
4
|
declare type OnErrorCb<Z, A extends TypeAllowed[]> = (e: null | Error, params: A extends [] ? Z : [Z, ...A]) => unknown;
|
|
5
5
|
declare type OnEndCb<T, Z, A extends TypeAllowed[]> = (res: T, params: A extends [] ? Z : [Z, ...A]) => unknown;
|
|
6
6
|
export default function useMutation<T, Z, A extends TypeAllowed[]>(func: (arg: Z, ...args: A) => Promise<T>): {
|
|
7
|
-
mutate: (param
|
|
7
|
+
mutate: (param?: Z, ...restParams: A) => Promise<UnwrappedPromiseType<typeof func>>;
|
|
8
8
|
onError: (cb: OnErrorCb<Z, A>) => unknown;
|
|
9
9
|
onEnd: (cb: OnEndCb<UnwrappedPromiseType<typeof func>, Z, A>) => unknown;
|
|
10
10
|
isPending: Ref<boolean>;
|