@tanstack/react-query 4.39.0 → 4.39.2
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/build/lib/Hydrate.esm.js +32 -0
- package/build/lib/Hydrate.esm.js.map +1 -0
- package/build/lib/Hydrate.js +57 -0
- package/build/lib/Hydrate.js.map +1 -0
- package/build/lib/Hydrate.mjs +32 -0
- package/build/lib/Hydrate.mjs.map +1 -0
- package/build/lib/QueryClientProvider.esm.js +66 -0
- package/build/lib/QueryClientProvider.esm.js.map +1 -0
- package/build/lib/QueryClientProvider.js +92 -0
- package/build/lib/QueryClientProvider.js.map +1 -0
- package/build/lib/QueryClientProvider.mjs +66 -0
- package/build/lib/QueryClientProvider.mjs.map +1 -0
- package/build/lib/QueryErrorResetBoundary.esm.js +33 -0
- package/build/lib/QueryErrorResetBoundary.esm.js.map +1 -0
- package/build/lib/QueryErrorResetBoundary.js +58 -0
- package/build/lib/QueryErrorResetBoundary.js.map +1 -0
- package/build/lib/QueryErrorResetBoundary.mjs +33 -0
- package/build/lib/QueryErrorResetBoundary.mjs.map +1 -0
- package/build/lib/errorBoundaryUtils.esm.js +28 -0
- package/build/lib/errorBoundaryUtils.esm.js.map +1 -0
- package/build/lib/errorBoundaryUtils.js +54 -0
- package/build/lib/errorBoundaryUtils.js.map +1 -0
- package/build/lib/errorBoundaryUtils.mjs +28 -0
- package/build/lib/errorBoundaryUtils.mjs.map +1 -0
- package/build/lib/index.esm.js +16 -0
- package/build/lib/index.esm.js.map +1 -0
- package/build/lib/index.js +47 -0
- package/build/lib/index.js.map +1 -0
- package/build/lib/index.mjs +16 -0
- package/build/lib/index.mjs.map +1 -0
- package/build/lib/isRestoring.esm.js +9 -0
- package/build/lib/isRestoring.esm.js.map +1 -0
- package/build/lib/isRestoring.js +34 -0
- package/build/lib/isRestoring.js.map +1 -0
- package/build/lib/isRestoring.mjs +9 -0
- package/build/lib/isRestoring.mjs.map +1 -0
- package/build/lib/queryOptions.d.ts +2 -2
- package/build/lib/queryOptions.esm.js +6 -0
- package/build/lib/queryOptions.esm.js.map +1 -0
- package/build/lib/queryOptions.js +10 -0
- package/build/lib/queryOptions.js.map +1 -0
- package/build/lib/queryOptions.mjs +6 -0
- package/build/lib/queryOptions.mjs.map +1 -0
- package/build/lib/reactBatchedUpdates.esm.js +7 -0
- package/build/lib/reactBatchedUpdates.esm.js.map +1 -0
- package/build/lib/reactBatchedUpdates.js +31 -0
- package/build/lib/reactBatchedUpdates.js.map +1 -0
- package/build/lib/reactBatchedUpdates.mjs +7 -0
- package/build/lib/reactBatchedUpdates.mjs.map +1 -0
- package/build/lib/reactBatchedUpdates.native.esm.js +2 -0
- package/build/lib/reactBatchedUpdates.native.esm.js.map +1 -0
- package/build/lib/reactBatchedUpdates.native.js +13 -0
- package/build/lib/reactBatchedUpdates.native.js.map +1 -0
- package/build/lib/reactBatchedUpdates.native.mjs +2 -0
- package/build/lib/reactBatchedUpdates.native.mjs.map +1 -0
- package/build/lib/setBatchUpdatesFn.esm.js +5 -0
- package/build/lib/setBatchUpdatesFn.esm.js.map +1 -0
- package/build/lib/setBatchUpdatesFn.js +7 -0
- package/build/lib/setBatchUpdatesFn.js.map +1 -0
- package/build/lib/setBatchUpdatesFn.mjs +5 -0
- package/build/lib/setBatchUpdatesFn.mjs.map +1 -0
- package/build/lib/suspense.esm.js +24 -0
- package/build/lib/suspense.esm.js.map +1 -0
- package/build/lib/suspense.js +31 -0
- package/build/lib/suspense.js.map +1 -0
- package/build/lib/suspense.mjs +24 -0
- package/build/lib/suspense.mjs.map +1 -0
- package/build/lib/useBaseQuery.esm.js +72 -0
- package/build/lib/useBaseQuery.esm.js.map +1 -0
- package/build/lib/useBaseQuery.js +96 -0
- package/build/lib/useBaseQuery.js.map +1 -0
- package/build/lib/useBaseQuery.mjs +72 -0
- package/build/lib/useBaseQuery.mjs.map +1 -0
- package/build/lib/useInfiniteQuery.esm.js +11 -0
- package/build/lib/useInfiniteQuery.esm.js.map +1 -0
- package/build/lib/useInfiniteQuery.js +15 -0
- package/build/lib/useInfiniteQuery.js.map +1 -0
- package/build/lib/useInfiniteQuery.mjs +11 -0
- package/build/lib/useInfiniteQuery.mjs.map +1 -0
- package/build/lib/useIsFetching.esm.js +17 -0
- package/build/lib/useIsFetching.esm.js.map +1 -0
- package/build/lib/useIsFetching.js +41 -0
- package/build/lib/useIsFetching.js.map +1 -0
- package/build/lib/useIsFetching.mjs +17 -0
- package/build/lib/useIsFetching.mjs.map +1 -0
- package/build/lib/useIsMutating.esm.js +17 -0
- package/build/lib/useIsMutating.esm.js.map +1 -0
- package/build/lib/useIsMutating.js +41 -0
- package/build/lib/useIsMutating.js.map +1 -0
- package/build/lib/useIsMutating.mjs +17 -0
- package/build/lib/useIsMutating.mjs.map +1 -0
- package/build/lib/useMutation.esm.js +35 -0
- package/build/lib/useMutation.esm.js.map +1 -0
- package/build/lib/useMutation.js +59 -0
- package/build/lib/useMutation.js.map +1 -0
- package/build/lib/useMutation.mjs +35 -0
- package/build/lib/useMutation.mjs.map +1 -0
- package/build/lib/useQueries.esm.js +81 -0
- package/build/lib/useQueries.esm.js.map +1 -0
- package/build/lib/useQueries.js +105 -0
- package/build/lib/useQueries.js.map +1 -0
- package/build/lib/useQueries.mjs +81 -0
- package/build/lib/useQueries.mjs.map +1 -0
- package/build/lib/useQuery.d.ts +0 -3
- package/build/lib/useQuery.esm.js +12 -0
- package/build/lib/useQuery.esm.js.map +1 -0
- package/build/lib/useQuery.js +16 -0
- package/build/lib/useQuery.js.map +1 -0
- package/build/lib/useQuery.mjs +12 -0
- package/build/lib/useQuery.mjs.map +1 -0
- package/build/lib/useSuspenseQueries.esm.js +20 -0
- package/build/lib/useSuspenseQueries.esm.js.map +1 -0
- package/build/lib/useSuspenseQueries.js +24 -0
- package/build/lib/useSuspenseQueries.js.map +1 -0
- package/build/lib/useSuspenseQueries.mjs +20 -0
- package/build/lib/useSuspenseQueries.mjs.map +1 -0
- package/build/lib/useSuspenseQuery.d.ts +1 -3
- package/build/lib/useSuspenseQuery.esm.js +15 -0
- package/build/lib/useSuspenseQuery.esm.js.map +1 -0
- package/build/lib/useSuspenseQuery.js +19 -0
- package/build/lib/useSuspenseQuery.js.map +1 -0
- package/build/lib/useSuspenseQuery.mjs +15 -0
- package/build/lib/useSuspenseQuery.mjs.map +1 -0
- package/build/lib/useSyncExternalStore.esm.js +7 -0
- package/build/lib/useSyncExternalStore.esm.js.map +1 -0
- package/build/lib/useSyncExternalStore.js +11 -0
- package/build/lib/useSyncExternalStore.js.map +1 -0
- package/build/lib/useSyncExternalStore.mjs +7 -0
- package/build/lib/useSyncExternalStore.mjs.map +1 -0
- package/build/lib/useSyncExternalStore.native.esm.js +2 -0
- package/build/lib/useSyncExternalStore.native.esm.js.map +1 -0
- package/build/lib/useSyncExternalStore.native.js +13 -0
- package/build/lib/useSyncExternalStore.native.js.map +1 -0
- package/build/lib/useSyncExternalStore.native.mjs +2 -0
- package/build/lib/useSyncExternalStore.native.mjs.map +1 -0
- package/build/lib/utils.esm.js +11 -0
- package/build/lib/utils.esm.js.map +1 -0
- package/build/lib/utils.js +15 -0
- package/build/lib/utils.js.map +1 -0
- package/build/lib/utils.mjs +11 -0
- package/build/lib/utils.mjs.map +1 -0
- package/build/umd/index.development.js +4049 -0
- package/build/umd/index.development.js.map +1 -0
- package/build/umd/index.production.js +2 -0
- package/build/umd/index.production.js.map +1 -0
- package/package.json +2 -2
- package/src/__tests__/useQuery.types.test.tsx +35 -0
- package/src/queryOptions.ts +2 -2
- package/src/useQuery.ts +0 -20
- package/src/useSuspenseQuery.ts +1 -4
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var queryCore = require('@tanstack/query-core');
|
|
6
|
+
var useBaseQuery = require('./useBaseQuery.js');
|
|
7
|
+
|
|
8
|
+
function useSuspenseQuery(options) {
|
|
9
|
+
return useBaseQuery.useBaseQuery({ ...options,
|
|
10
|
+
enabled: true,
|
|
11
|
+
useErrorBoundary: true,
|
|
12
|
+
suspense: true,
|
|
13
|
+
placeholderData: undefined,
|
|
14
|
+
networkMode: 'always'
|
|
15
|
+
}, queryCore.QueryObserver);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
exports.useSuspenseQuery = useSuspenseQuery;
|
|
19
|
+
//# sourceMappingURL=useSuspenseQuery.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuspenseQuery.js","sources":["../../src/useSuspenseQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefinedQueryObserverResult,\n DistributiveOmit,\n OmitKeyof,\n QueryKey,\n} from '@tanstack/query-core'\nimport type { UseQueryOptions } from './types'\n\nexport type UseSuspenseQueryResult<\n TData = unknown,\n TError = unknown,\n> = DistributiveOmit<\n DefinedQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\nexport type UseSuspenseQueryOptions<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = OmitKeyof<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n | 'enabled'\n | 'useErrorBoundary'\n | 'suspense'\n | 'placeholderData'\n | 'networkMode'\n | 'onSuccess'\n | 'onError'\n | 'onSettled'\n | 'getPreviousPageParam'\n | 'getNextPageParam'\n>\n\nexport function useSuspenseQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(options: UseSuspenseQueryOptions<TQueryFnData, TError, TData, TQueryKey>) {\n return useBaseQuery(\n {\n ...options,\n enabled: true,\n useErrorBoundary: true,\n suspense: true,\n placeholderData: undefined,\n networkMode: 'always',\n },\n QueryObserver,\n ) as UseSuspenseQueryResult<TData, TError>\n}\n"],"names":["useSuspenseQuery","options","useBaseQuery","enabled","useErrorBoundary","suspense","placeholderData","undefined","networkMode","QueryObserver"],"mappings":";;;;;;;AAqCO,SAASA,gBAAT,CAKLC,OALK,EAKqE;AAC1E,EAAA,OAAOC,yBAAY,CACjB,EACE,GAAGD,OADL;AAEEE,IAAAA,OAAO,EAAE,IAFX;AAGEC,IAAAA,gBAAgB,EAAE,IAHpB;AAIEC,IAAAA,QAAQ,EAAE,IAJZ;AAKEC,IAAAA,eAAe,EAAEC,SALnB;AAMEC,IAAAA,WAAW,EAAE,QAAA;GAPE,EASjBC,uBATiB,CAAnB,CAAA;AAWD;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { QueryObserver } from '@tanstack/query-core';
|
|
2
|
+
import { useBaseQuery } from './useBaseQuery.mjs';
|
|
3
|
+
|
|
4
|
+
function useSuspenseQuery(options) {
|
|
5
|
+
return useBaseQuery({ ...options,
|
|
6
|
+
enabled: true,
|
|
7
|
+
useErrorBoundary: true,
|
|
8
|
+
suspense: true,
|
|
9
|
+
placeholderData: undefined,
|
|
10
|
+
networkMode: 'always'
|
|
11
|
+
}, QueryObserver);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export { useSuspenseQuery };
|
|
15
|
+
//# sourceMappingURL=useSuspenseQuery.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSuspenseQuery.mjs","sources":["../../src/useSuspenseQuery.ts"],"sourcesContent":["import { QueryObserver } from '@tanstack/query-core'\nimport { useBaseQuery } from './useBaseQuery'\nimport type {\n DefinedQueryObserverResult,\n DistributiveOmit,\n OmitKeyof,\n QueryKey,\n} from '@tanstack/query-core'\nimport type { UseQueryOptions } from './types'\n\nexport type UseSuspenseQueryResult<\n TData = unknown,\n TError = unknown,\n> = DistributiveOmit<\n DefinedQueryObserverResult<TData, TError>,\n 'isPlaceholderData'\n>\n\nexport type UseSuspenseQueryOptions<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n> = OmitKeyof<\n UseQueryOptions<TQueryFnData, TError, TData, TQueryKey>,\n | 'enabled'\n | 'useErrorBoundary'\n | 'suspense'\n | 'placeholderData'\n | 'networkMode'\n | 'onSuccess'\n | 'onError'\n | 'onSettled'\n | 'getPreviousPageParam'\n | 'getNextPageParam'\n>\n\nexport function useSuspenseQuery<\n TQueryFnData = unknown,\n TError = unknown,\n TData = TQueryFnData,\n TQueryKey extends QueryKey = QueryKey,\n>(options: UseSuspenseQueryOptions<TQueryFnData, TError, TData, TQueryKey>) {\n return useBaseQuery(\n {\n ...options,\n enabled: true,\n useErrorBoundary: true,\n suspense: true,\n placeholderData: undefined,\n networkMode: 'always',\n },\n QueryObserver,\n ) as UseSuspenseQueryResult<TData, TError>\n}\n"],"names":["useSuspenseQuery","options","useBaseQuery","enabled","useErrorBoundary","suspense","placeholderData","undefined","networkMode","QueryObserver"],"mappings":";;;AAqCO,SAASA,gBAAT,CAKLC,OALK,EAKqE;AAC1E,EAAA,OAAOC,YAAY,CACjB,EACE,GAAGD,OADL;AAEEE,IAAAA,OAAO,EAAE,IAFX;AAGEC,IAAAA,gBAAgB,EAAE,IAHpB;AAIEC,IAAAA,QAAQ,EAAE,IAJZ;AAKEC,IAAAA,eAAe,EAAEC,SALnB;AAMEC,IAAAA,WAAW,EAAE,QAAA;GAPE,EASjBC,aATiB,CAAnB,CAAA;AAWD;;;;"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { useSyncExternalStore as useSyncExternalStore$1 } from 'use-sync-external-store/shim/index.js';
|
|
3
|
+
|
|
4
|
+
const useSyncExternalStore = useSyncExternalStore$1;
|
|
5
|
+
|
|
6
|
+
export { useSyncExternalStore };
|
|
7
|
+
//# sourceMappingURL=useSyncExternalStore.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSyncExternalStore.esm.js","sources":["../../src/useSyncExternalStore.ts"],"sourcesContent":["'use client'\n// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601\nimport { useSyncExternalStore as uSES } from 'use-sync-external-store/shim/index.js'\n\nexport const useSyncExternalStore = uSES\n"],"names":[],"mappings":";;;AAIO;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
'use strict';
|
|
3
|
+
|
|
4
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
5
|
+
|
|
6
|
+
var index_js = require('use-sync-external-store/shim/index.js');
|
|
7
|
+
|
|
8
|
+
const useSyncExternalStore = index_js.useSyncExternalStore;
|
|
9
|
+
|
|
10
|
+
exports.useSyncExternalStore = useSyncExternalStore;
|
|
11
|
+
//# sourceMappingURL=useSyncExternalStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSyncExternalStore.js","sources":["../../src/useSyncExternalStore.ts"],"sourcesContent":["'use client'\n// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601\nimport { useSyncExternalStore as uSES } from 'use-sync-external-store/shim/index.js'\n\nexport const useSyncExternalStore = uSES\n"],"names":[],"mappings":";;;;;;;AAIO;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSyncExternalStore.mjs","sources":["../../src/useSyncExternalStore.ts"],"sourcesContent":["'use client'\n// Temporary workaround due to an issue with react-native uSES - https://github.com/TanStack/query/pull/3601\nimport { useSyncExternalStore as uSES } from 'use-sync-external-store/shim/index.js'\n\nexport const useSyncExternalStore = uSES\n"],"names":[],"mappings":";;;AAIO;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSyncExternalStore.native.esm.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
var index_native_js = require('use-sync-external-store/shim/index.native.js');
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
Object.defineProperty(exports, 'useSyncExternalStore', {
|
|
10
|
+
enumerable: true,
|
|
11
|
+
get: function () { return index_native_js.useSyncExternalStore; }
|
|
12
|
+
});
|
|
13
|
+
//# sourceMappingURL=useSyncExternalStore.native.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSyncExternalStore.native.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useSyncExternalStore.native.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function shouldThrowError(_useErrorBoundary, params) {
|
|
2
|
+
// Allow useErrorBoundary function to override throwing behavior on a per-error basis
|
|
3
|
+
if (typeof _useErrorBoundary === 'function') {
|
|
4
|
+
return _useErrorBoundary(...params);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
return !!_useErrorBoundary;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { shouldThrowError };
|
|
11
|
+
//# sourceMappingURL=utils.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.esm.js","sources":["../../src/utils.ts"],"sourcesContent":["export function shouldThrowError<T extends (...args: any[]) => boolean>(\n _useErrorBoundary: boolean | T | undefined,\n params: Parameters<T>,\n): boolean {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary(...params)\n }\n\n return !!_useErrorBoundary\n}\n"],"names":["shouldThrowError","_useErrorBoundary","params"],"mappings":"AAAO,SAASA,gBAAT,CACLC,iBADK,EAELC,MAFK,EAGI;AACT;AACA,EAAA,IAAI,OAAOD,iBAAP,KAA6B,UAAjC,EAA6C;AAC3C,IAAA,OAAOA,iBAAiB,CAAC,GAAGC,MAAJ,CAAxB,CAAA;AACD,GAAA;;EAED,OAAO,CAAC,CAACD,iBAAT,CAAA;AACD;;;;"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
+
|
|
5
|
+
function shouldThrowError(_useErrorBoundary, params) {
|
|
6
|
+
// Allow useErrorBoundary function to override throwing behavior on a per-error basis
|
|
7
|
+
if (typeof _useErrorBoundary === 'function') {
|
|
8
|
+
return _useErrorBoundary(...params);
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
return !!_useErrorBoundary;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
exports.shouldThrowError = shouldThrowError;
|
|
15
|
+
//# sourceMappingURL=utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.js","sources":["../../src/utils.ts"],"sourcesContent":["export function shouldThrowError<T extends (...args: any[]) => boolean>(\n _useErrorBoundary: boolean | T | undefined,\n params: Parameters<T>,\n): boolean {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary(...params)\n }\n\n return !!_useErrorBoundary\n}\n"],"names":["shouldThrowError","_useErrorBoundary","params"],"mappings":";;;;AAAO,SAASA,gBAAT,CACLC,iBADK,EAELC,MAFK,EAGI;AACT;AACA,EAAA,IAAI,OAAOD,iBAAP,KAA6B,UAAjC,EAA6C;AAC3C,IAAA,OAAOA,iBAAiB,CAAC,GAAGC,MAAJ,CAAxB,CAAA;AACD,GAAA;;EAED,OAAO,CAAC,CAACD,iBAAT,CAAA;AACD;;;;"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
function shouldThrowError(_useErrorBoundary, params) {
|
|
2
|
+
// Allow useErrorBoundary function to override throwing behavior on a per-error basis
|
|
3
|
+
if (typeof _useErrorBoundary === 'function') {
|
|
4
|
+
return _useErrorBoundary(...params);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
return !!_useErrorBoundary;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export { shouldThrowError };
|
|
11
|
+
//# sourceMappingURL=utils.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"utils.mjs","sources":["../../src/utils.ts"],"sourcesContent":["export function shouldThrowError<T extends (...args: any[]) => boolean>(\n _useErrorBoundary: boolean | T | undefined,\n params: Parameters<T>,\n): boolean {\n // Allow useErrorBoundary function to override throwing behavior on a per-error basis\n if (typeof _useErrorBoundary === 'function') {\n return _useErrorBoundary(...params)\n }\n\n return !!_useErrorBoundary\n}\n"],"names":["shouldThrowError","_useErrorBoundary","params"],"mappings":"AAAO,SAASA,gBAAT,CACLC,iBADK,EAELC,MAFK,EAGI;AACT;AACA,EAAA,IAAI,OAAOD,iBAAP,KAA6B,UAAjC,EAA6C;AAC3C,IAAA,OAAOA,iBAAiB,CAAC,GAAGC,MAAJ,CAAxB,CAAA;AACD,GAAA;;EAED,OAAO,CAAC,CAACD,iBAAT,CAAA;AACD;;;;"}
|