Skip to content

Commit f661420

Browse files
committed
fix: onError typings
1 parent bab7d86 commit f661420

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@ryfylke-react/rtk-query-loader",
3-
"version": "0.3.2",
3+
"version": "0.3.21",
44
"description": "Lets you create loaders that contain multiple RTK queries.",
55
"main": "./dist/cjs/index.js",
66
"module": "./dist/esm/index.js",

src/types.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,10 @@ export type CreateLoaderArgs<
8989
> = Partial<CreateUseLoaderArgs<QRU, R, A>> & {
9090
queriesArg?: (props: P) => A;
9191
onLoading?: (props: P) => ReactElement;
92-
onError?: (props: P, error?: unknown) => ReactElement;
92+
onError?: (
93+
props: P,
94+
error: FetchBaseQueryError | SerializedError
95+
) => ReactElement;
9396
onFetching?: (
9497
props: P,
9598
renderBody: () => ReactElement

0 commit comments

Comments
 (0)