chore(eslint): fix react-query cancelable promise type
This commit is contained in:
parent
a914950982
commit
4e218ba562
1 changed files with 3 additions and 2 deletions
|
@ -70,8 +70,9 @@ const defaultQueryFn: QueryFunction<unknown, QueryKey> = async ({
|
||||||
}
|
}
|
||||||
throw new Error(`Error fetching from "${scope}" API`);
|
throw new Error(`Error fetching from "${scope}" API`);
|
||||||
});
|
});
|
||||||
(promise as any).cancel = () => controller && controller.abort();
|
return Object.assign(promise, {
|
||||||
return promise;
|
cancel: () => controller && controller.abort()
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
let paysCache: { label: string }[];
|
let paysCache: { label: string }[];
|
||||||
|
|
Loading…
Reference in a new issue