react-redux-cache 0.21.0 → 0.22.1

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.
@@ -1,64 +1,55 @@
1
- import {EMPTY_OBJECT} from './utilsAndConstants'
2
-
1
+ import { EMPTY_OBJECT } from './utilsAndConstants';
3
2
  export const createSelectors = (cache) => {
4
- const selectEntityById = (state, id, typename) => {
5
- var _a
6
- return id == null
7
- ? undefined
8
- : (_a = cache.cacheStateSelector(state).entities[typename]) === null || _a === void 0
9
- ? void 0
10
- : _a[id]
11
- }
12
- const selectQueryState = (state, query, cacheKey) => {
13
- var _a
14
- return (_a = cache.cacheStateSelector(state).queries[query][cacheKey]) !== null && _a !== void 0
15
- ? _a
16
- : EMPTY_OBJECT
17
- }
18
- const selectMutationState = (state, mutation) => {
19
- var _a
20
- return (_a = cache.cacheStateSelector(state).mutations[mutation]) !== null && _a !== void 0
21
- ? _a
22
- : EMPTY_OBJECT
23
- }
24
- return {
25
- selectQueryState,
26
- selectQueryResult: (state, query, cacheKey) => {
27
- return selectQueryState(state, query, cacheKey).result
28
- },
29
- selectQueryLoading: (state, query, cacheKey) => {
30
- var _a
31
- return (_a = selectQueryState(state, query, cacheKey).loading) !== null && _a !== void 0 ? _a : false
32
- },
33
- selectQueryError: (state, query, cacheKey) => {
34
- return selectQueryState(state, query, cacheKey).error
35
- },
36
- selectQueryParams: (state, query, cacheKey) => {
37
- return selectQueryState(state, query, cacheKey).params
38
- },
39
- selectQueryExpiresAt: (state, query, cacheKey) => {
40
- return selectQueryState(state, query, cacheKey).expiresAt
41
- },
42
- selectMutationState,
43
- selectMutationResult: (state, mutation) => {
44
- return selectMutationState(state, mutation).result
45
- },
46
- selectMutationLoading: (state, mutation) => {
47
- var _a
48
- return (_a = selectMutationState(state, mutation).loading) !== null && _a !== void 0 ? _a : false
49
- },
50
- selectMutationError: (state, mutation) => {
51
- return selectMutationState(state, mutation).error
52
- },
53
- selectMutationParams: (state, mutation) => {
54
- return selectMutationState(state, mutation).params
55
- },
56
- selectEntityById,
57
- selectEntities: (state) => {
58
- return cache.cacheStateSelector(state).entities
59
- },
60
- selectEntitiesByTypename: (state, typename) => {
61
- return cache.cacheStateSelector(state).entities[typename]
62
- },
63
- }
64
- }
3
+ const selectEntityById = (state, id, typename) => {
4
+ var _a;
5
+ return id == null ? undefined : (_a = cache.cacheStateSelector(state).entities[typename]) === null || _a === void 0 ? void 0 : _a[id];
6
+ };
7
+ const selectQueryState = (state, query, cacheKey) => {
8
+ var _a;
9
+ return (_a = cache.cacheStateSelector(state).queries[query][cacheKey]) !== null && _a !== void 0 ? _a : EMPTY_OBJECT;
10
+ };
11
+ const selectMutationState = (state, mutation) => {
12
+ var _a;
13
+ return (_a = cache.cacheStateSelector(state).mutations[mutation]) !== null && _a !== void 0 ? _a : EMPTY_OBJECT;
14
+ };
15
+ return {
16
+ selectEntityById,
17
+ selectQueryState,
18
+ selectQueryResult: (state, query, cacheKey) => {
19
+ return selectQueryState(state, query, cacheKey).result;
20
+ },
21
+ selectQueryLoading: (state, query, cacheKey) => {
22
+ var _a;
23
+ return (_a = selectQueryState(state, query, cacheKey).loading) !== null && _a !== void 0 ? _a : false;
24
+ },
25
+ selectQueryError: (state, query, cacheKey) => {
26
+ return selectQueryState(state, query, cacheKey).error;
27
+ },
28
+ selectQueryParams: (state, query, cacheKey) => {
29
+ return selectQueryState(state, query, cacheKey).params;
30
+ },
31
+ selectQueryExpiresAt: (state, query, cacheKey) => {
32
+ return selectQueryState(state, query, cacheKey).expiresAt;
33
+ },
34
+ selectMutationState,
35
+ selectMutationResult: (state, mutation) => {
36
+ return selectMutationState(state, mutation).result;
37
+ },
38
+ selectMutationLoading: (state, mutation) => {
39
+ var _a;
40
+ return (_a = selectMutationState(state, mutation).loading) !== null && _a !== void 0 ? _a : false;
41
+ },
42
+ selectMutationError: (state, mutation) => {
43
+ return selectMutationState(state, mutation).error;
44
+ },
45
+ selectMutationParams: (state, mutation) => {
46
+ return selectMutationState(state, mutation).params;
47
+ },
48
+ selectEntities: (state) => {
49
+ return cache.cacheStateSelector(state).entities;
50
+ },
51
+ selectEntitiesByTypename: (state, typename) => {
52
+ return cache.cacheStateSelector(state).entities[typename];
53
+ },
54
+ };
55
+ };
package/dist/esm/index.js CHANGED
@@ -1,5 +1,3 @@
1
- export {createCache, withTypenames} from './createCache'
2
-
3
- export * from './types'
4
-
5
- export {createStateComparer, defaultGetCacheKey, FetchPolicy, isEmptyObject, noop} from './utilsAndConstants'
1
+ export { createCache, withTypenames } from './createCache';
2
+ export * from './types';
3
+ export { createStateComparer, defaultGetCacheKey, FetchPolicy, isEmptyObject, noop } from './utilsAndConstants';
@@ -1,150 +1,73 @@
1
- var __awaiter =
2
- (this && this.__awaiter) ||
3
- function (thisArg, _arguments, P, generator) {
4
- function adopt(value) {
5
- return value instanceof P
6
- ? value
7
- : new P(function (resolve) {
8
- resolve(value)
9
- })
10
- }
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11
3
  return new (P || (P = Promise))(function (resolve, reject) {
12
- function fulfilled(value) {
13
- try {
14
- step(generator.next(value))
15
- } catch (e) {
16
- reject(e)
17
- }
18
- }
19
- function rejected(value) {
20
- try {
21
- step(generator['throw'](value))
22
- } catch (e) {
23
- reject(e)
24
- }
25
- }
26
- function step(result) {
27
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected)
28
- }
29
- step((generator = generator.apply(thisArg, _arguments || [])).next())
30
- })
31
- }
32
- import {logDebug} from './utilsAndConstants'
33
-
34
- export const mutate = (
35
- logTag_1,
36
- store_1,
37
- cache_1,
38
- actions_1,
39
- selectors_1,
40
- mutationKey_1,
41
- params_1,
42
- abortControllers_1,
43
- ...args_1
44
- ) =>
45
- __awaiter(
46
- void 0,
47
- [
48
- logTag_1,
49
- store_1,
50
- cache_1,
51
- actions_1,
52
- selectors_1,
53
- mutationKey_1,
54
- params_1,
55
- abortControllers_1,
56
- ...args_1,
57
- ],
58
- void 0,
59
- function* (
60
- logTag,
61
- store,
62
- cache,
63
- actions,
64
- selectors,
65
- mutationKey,
66
- params,
67
- abortControllers,
68
- onCompleted = cache.mutations[mutationKey].onCompleted,
69
- onSuccess = cache.mutations[mutationKey].onSuccess,
70
- onError = cache.mutations[mutationKey].onError
71
- ) {
72
- var _a, _b
73
- const {updateMutationStateAndEntities} = actions
74
- let abortControllersOfStore = abortControllers.get(store)
75
- if (abortControllersOfStore === undefined) {
76
- abortControllersOfStore = {}
77
- abortControllers.set(store, abortControllersOfStore)
78
- }
79
- {
80
- const abortController = abortControllersOfStore[mutationKey]
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { logDebug } from './utilsAndConstants';
11
+ export const mutate = (logTag_1, store_1, cache_1, actions_1, selectors_1, mutationKey_1, params_1, abortControllers_1, ...args_1) => __awaiter(void 0, [logTag_1, store_1, cache_1, actions_1, selectors_1, mutationKey_1, params_1, abortControllers_1, ...args_1], void 0, function* (logTag, store, cache, actions, selectors, mutationKey, params, abortControllers, onCompleted = cache.mutations[mutationKey].onCompleted, onSuccess = cache.mutations[mutationKey].onSuccess, onError = cache.mutations[mutationKey].onError) {
12
+ var _a, _b;
13
+ const { updateMutationStateAndEntities } = actions;
14
+ let abortControllersOfStore = abortControllers.get(store);
15
+ if (abortControllersOfStore === undefined) {
16
+ abortControllersOfStore = {};
17
+ abortControllers.set(store, abortControllersOfStore);
18
+ }
19
+ {
20
+ const abortController = abortControllersOfStore[mutationKey];
81
21
  cache.options.logsEnabled &&
82
- logDebug(logTag, {mutationKey, params, previousAborted: abortController !== undefined})
22
+ logDebug(logTag, { mutationKey, params, previousAborted: abortController !== undefined });
83
23
  if (abortController !== undefined) {
84
- abortController.abort()
24
+ abortController.abort();
85
25
  }
86
- }
87
- const abortController = new AbortController()
88
- abortControllersOfStore[mutationKey] = abortController
89
- const mutatePromise = cache.mutations[mutationKey].mutation(params, store, abortController.signal)
90
- store.dispatch(
91
- updateMutationStateAndEntities(mutationKey, {
92
- loading: mutatePromise,
93
- params,
94
- result: undefined,
95
- })
96
- )
97
- let response
98
- let error
99
- try {
100
- response = yield mutatePromise
101
- } catch (e) {
102
- error = e
103
- }
104
- cache.options.logsEnabled &&
105
- logDebug(`${logTag} finished`, {response, error, aborted: abortController.signal.aborted})
106
- if (abortController.signal.aborted) {
107
- return ABORTED_RESULT
108
- }
109
- delete abortControllersOfStore[mutationKey]
110
- if (error) {
111
- store.dispatch(
112
- updateMutationStateAndEntities(mutationKey, {
113
- error,
26
+ }
27
+ const abortController = new AbortController();
28
+ abortControllersOfStore[mutationKey] = abortController;
29
+ const mutatePromise = cache.mutations[mutationKey].mutation(params, store, abortController.signal);
30
+ store.dispatch(updateMutationStateAndEntities(mutationKey, {
31
+ loading: mutatePromise,
32
+ params,
33
+ result: undefined,
34
+ }));
35
+ let response;
36
+ let error;
37
+ try {
38
+ response = yield mutatePromise;
39
+ }
40
+ catch (e) {
41
+ error = e;
42
+ }
43
+ cache.options.logsEnabled &&
44
+ logDebug(`${logTag} finished`, { response, error, aborted: abortController.signal.aborted });
45
+ if (abortController.signal.aborted) {
46
+ return ABORTED_RESULT;
47
+ }
48
+ delete abortControllersOfStore[mutationKey];
49
+ if (error) {
50
+ store.dispatch(updateMutationStateAndEntities(mutationKey, {
51
+ error: error,
114
52
  loading: undefined,
115
- })
116
- )
117
- if (
118
- !(onError === null || onError === void 0
119
- ? void 0
120
- : onError(error, params, store, actions, selectors))
121
- ) {
122
- ;(_b = (_a = cache.globals).onError) === null || _b === void 0
123
- ? void 0
124
- : _b.call(_a, error, mutationKey, params, store, actions, selectors)
53
+ }));
54
+ if (!(onError === null || onError === void 0 ? void 0 : onError(error, params, store, actions, selectors))) {
55
+ (_b = (_a = cache.globals).onError) === null || _b === void 0 ? void 0 : _b.call(_a, error, mutationKey, params, store, actions, selectors);
125
56
  }
126
- onCompleted === null || onCompleted === void 0
127
- ? void 0
128
- : onCompleted(response, error, params, store, actions, selectors)
129
- return {error}
130
- }
131
- if (response) {
57
+ onCompleted === null || onCompleted === void 0 ? void 0 : onCompleted(response, error, params, store, actions, selectors);
58
+ return { error };
59
+ }
60
+ if (response) {
132
61
  const newState = {
133
- error: undefined,
134
- loading: undefined,
135
- result: response.result,
136
- }
137
- store.dispatch(updateMutationStateAndEntities(mutationKey, newState, response))
138
- onSuccess === null || onSuccess === void 0
139
- ? void 0
140
- : onSuccess(response, params, store, actions, selectors)
141
- onCompleted === null || onCompleted === void 0
142
- ? void 0
143
- : onCompleted(response, error, params, store, actions, selectors)
144
- return {result: response.result}
145
- }
146
- throw new Error(`${logTag}: both error and response are not defined`)
62
+ error: undefined,
63
+ loading: undefined,
64
+ result: response.result,
65
+ };
66
+ store.dispatch(updateMutationStateAndEntities(mutationKey, newState, response));
67
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(response, params, store, actions, selectors);
68
+ onCompleted === null || onCompleted === void 0 ? void 0 : onCompleted(response, error, params, store, actions, selectors);
69
+ return { result: response.result };
147
70
  }
148
- )
149
-
150
- const ABORTED_RESULT = Object.freeze({aborted: true})
71
+ throw new Error(`${logTag}: both error and response are not defined`);
72
+ });
73
+ const ABORTED_RESULT = Object.freeze({ aborted: true });
package/dist/esm/query.js CHANGED
@@ -1,160 +1,77 @@
1
- var __awaiter =
2
- (this && this.__awaiter) ||
3
- function (thisArg, _arguments, P, generator) {
4
- function adopt(value) {
5
- return value instanceof P
6
- ? value
7
- : new P(function (resolve) {
8
- resolve(value)
9
- })
10
- }
1
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
11
3
  return new (P || (P = Promise))(function (resolve, reject) {
12
- function fulfilled(value) {
13
- try {
14
- step(generator.next(value))
15
- } catch (e) {
16
- reject(e)
17
- }
18
- }
19
- function rejected(value) {
20
- try {
21
- step(generator['throw'](value))
22
- } catch (e) {
23
- reject(e)
24
- }
25
- }
26
- function step(result) {
27
- result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected)
28
- }
29
- step((generator = generator.apply(thisArg, _arguments || [])).next())
30
- })
31
- }
32
- import {logDebug, noop} from './utilsAndConstants'
33
-
34
- export const query = (
35
- logTag,
36
- store,
37
- cache,
38
- actions,
39
- selectors,
40
- queryKey,
41
- cacheKey,
42
- params,
43
- secondsToLive,
44
- onlyIfExpired,
45
- skipFetch,
46
- mergeResults,
47
- onCompleted,
48
- onSuccess,
49
- onError
50
- ) =>
51
- __awaiter(void 0, void 0, void 0, function* () {
52
- var _a, _b, _c, _d
53
- if (secondsToLive === void 0) {
54
- secondsToLive =
55
- (_a = cache.queries[queryKey].secondsToLive) !== null && _a !== void 0
56
- ? _a
57
- : cache.globals.queries.secondsToLive
58
- }
59
- if (mergeResults === void 0) {
60
- mergeResults = cache.queries[queryKey].mergeResults
61
- }
62
- if (onCompleted === void 0) {
63
- onCompleted = cache.queries[queryKey].onCompleted
64
- }
65
- if (onSuccess === void 0) {
66
- onSuccess = cache.queries[queryKey].onSuccess
67
- }
68
- if (onError === void 0) {
69
- onError = cache.queries[queryKey].onError
70
- }
71
- const {selectQueryResult, selectQueryState} = selectors
72
- const logsEnabled = cache.options.logsEnabled
73
- const queryStateOnStart = selectQueryState(store.getState(), queryKey, cacheKey)
4
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
8
+ });
9
+ };
10
+ import { logDebug, noop } from './utilsAndConstants';
11
+ export const query = (logTag, store, cache, actions, selectors, queryKey, cacheKey, params, secondsToLive, onlyIfExpired, skipFetch, mergeResults, onCompleted, onSuccess, onError) => __awaiter(void 0, void 0, void 0, function* () {
12
+ var _a, _b, _c, _d;
13
+ if (secondsToLive === void 0) { secondsToLive = (_a = cache.queries[queryKey].secondsToLive) !== null && _a !== void 0 ? _a : cache.globals.queries.secondsToLive; }
14
+ if (mergeResults === void 0) { mergeResults = cache.queries[queryKey].mergeResults; }
15
+ if (onCompleted === void 0) { onCompleted = cache.queries[queryKey].onCompleted; }
16
+ if (onSuccess === void 0) { onSuccess = cache.queries[queryKey].onSuccess; }
17
+ if (onError === void 0) { onError = cache.queries[queryKey].onError; }
18
+ const { selectQueryResult, selectQueryState } = selectors;
19
+ const logsEnabled = cache.options.logsEnabled;
20
+ const queryStateOnStart = selectQueryState(store.getState(), queryKey, cacheKey);
74
21
  if (skipFetch) {
75
- return {result: queryStateOnStart.result}
22
+ return { result: queryStateOnStart.result };
76
23
  }
77
24
  if (queryStateOnStart === null || queryStateOnStart === void 0 ? void 0 : queryStateOnStart.loading) {
78
- logsEnabled &&
79
- logDebug(`${logTag} fetch cancelled: already loading`, {queryStateOnStart, params, cacheKey})
80
- const error = yield queryStateOnStart.loading.then(noop).catch(catchAndReturn)
81
- const result = selectQueryResult(store.getState(), queryKey, cacheKey)
82
- const cancelled = 'loading'
83
- return error ? {cancelled, result, error} : {cancelled, result}
25
+ logsEnabled &&
26
+ logDebug(`${logTag} fetch cancelled: already loading`, { queryStateOnStart, params, cacheKey });
27
+ const error = yield queryStateOnStart.loading.then(noop).catch(catchAndReturn);
28
+ const result = selectQueryResult(store.getState(), queryKey, cacheKey);
29
+ const cancelled = 'loading';
30
+ return error ? { cancelled, result, error } : { cancelled, result };
84
31
  }
85
- if (
86
- onlyIfExpired &&
87
- (queryStateOnStart === null || queryStateOnStart === void 0 ? void 0 : queryStateOnStart.expiresAt) !=
88
- null &&
89
- queryStateOnStart.expiresAt > Date.now()
90
- ) {
91
- logsEnabled &&
92
- logDebug(`${logTag} fetch cancelled: not expired yet`, {
93
- queryStateOnStart,
94
- params,
95
- cacheKey,
96
- onlyIfExpired,
97
- })
98
- return {cancelled: 'not-expired', result: queryStateOnStart.result}
32
+ if (onlyIfExpired && (queryStateOnStart === null || queryStateOnStart === void 0 ? void 0 : queryStateOnStart.expiresAt) != null && queryStateOnStart.expiresAt > Date.now()) {
33
+ logsEnabled &&
34
+ logDebug(`${logTag} fetch cancelled: not expired yet`, {
35
+ queryStateOnStart,
36
+ params,
37
+ cacheKey,
38
+ onlyIfExpired,
39
+ });
40
+ return { cancelled: 'not-expired', result: queryStateOnStart.result };
99
41
  }
100
- const {updateQueryStateAndEntities} = actions
101
- const fetchPromise = cache.queries[queryKey].query(params, store)
102
- store.dispatch(
103
- updateQueryStateAndEntities(queryKey, cacheKey, {
42
+ const { updateQueryStateAndEntities } = actions;
43
+ const fetchPromise = cache.queries[queryKey].query(params, store);
44
+ store.dispatch(updateQueryStateAndEntities(queryKey, cacheKey, {
104
45
  loading: fetchPromise,
105
46
  params,
106
- })
107
- )
108
- logsEnabled &&
109
- logDebug(`${logTag} started`, {queryKey, params, cacheKey, queryStateOnStart, onlyIfExpired})
110
- let response
47
+ }));
48
+ logsEnabled && logDebug(`${logTag} started`, { queryKey, params, cacheKey, queryStateOnStart, onlyIfExpired });
49
+ let response;
111
50
  try {
112
- response = yield fetchPromise
113
- } catch (error) {
114
- store.dispatch(
115
- updateQueryStateAndEntities(queryKey, cacheKey, {
116
- error,
117
- loading: undefined,
118
- })
119
- )
120
- if (!(onError === null || onError === void 0 ? void 0 : onError(error, params, store))) {
121
- ;(_c = (_b = cache.globals).onError) === null || _c === void 0
122
- ? void 0
123
- : _c.call(_b, error, queryKey, params, store, actions, selectors)
124
- }
125
- onCompleted === null || onCompleted === void 0
126
- ? void 0
127
- : onCompleted(undefined, error, params, store, actions, selectors)
128
- return {error, result: selectQueryResult(store.getState(), queryKey, cacheKey)}
51
+ response = yield fetchPromise;
129
52
  }
130
- const newState = {
131
- error: undefined,
132
- loading: undefined,
133
- expiresAt:
134
- (_d = response.expiresAt) !== null && _d !== void 0
135
- ? _d
136
- : secondsToLive != null
137
- ? Date.now() + secondsToLive * 1000
138
- : undefined,
139
- result: mergeResults
140
- ? mergeResults(
141
- selectQueryResult(store.getState(), queryKey, cacheKey),
142
- response,
143
- params,
144
- store,
145
- actions,
146
- selectors
147
- )
148
- : response.result,
53
+ catch (error) {
54
+ store.dispatch(updateQueryStateAndEntities(queryKey, cacheKey, {
55
+ error: error,
56
+ loading: undefined,
57
+ }));
58
+ if (!(onError === null || onError === void 0 ? void 0 : onError(error, params, store))) {
59
+ (_c = (_b = cache.globals).onError) === null || _c === void 0 ? void 0 : _c.call(_b, error, queryKey, params, store, actions, selectors);
60
+ }
61
+ onCompleted === null || onCompleted === void 0 ? void 0 : onCompleted(undefined, error, params, store, actions, selectors);
62
+ return { error, result: selectQueryResult(store.getState(), queryKey, cacheKey) };
149
63
  }
150
- store.dispatch(updateQueryStateAndEntities(queryKey, cacheKey, newState, response))
151
- onSuccess === null || onSuccess === void 0
152
- ? void 0
153
- : onSuccess(response, params, store, actions, selectors)
154
- onCompleted === null || onCompleted === void 0
155
- ? void 0
156
- : onCompleted(response, undefined, params, store, actions, selectors)
157
- return {result: newState === null || newState === void 0 ? void 0 : newState.result}
158
- })
159
-
160
- const catchAndReturn = (x) => x
64
+ const newState = {
65
+ error: undefined,
66
+ loading: undefined,
67
+ expiresAt: (_d = response.expiresAt) !== null && _d !== void 0 ? _d : (secondsToLive != null ? Date.now() + secondsToLive * 1000 : undefined),
68
+ result: mergeResults
69
+ ? mergeResults(selectQueryResult(store.getState(), queryKey, cacheKey), response, params, store, actions, selectors)
70
+ : response.result,
71
+ };
72
+ store.dispatch(updateQueryStateAndEntities(queryKey, cacheKey, newState, response));
73
+ onSuccess === null || onSuccess === void 0 ? void 0 : onSuccess(response, params, store, actions, selectors);
74
+ onCompleted === null || onCompleted === void 0 ? void 0 : onCompleted(response, undefined, params, store, actions, selectors);
75
+ return { result: newState === null || newState === void 0 ? void 0 : newState.result };
76
+ });
77
+ const catchAndReturn = (x) => x;
package/dist/esm/types.js CHANGED
@@ -1 +1 @@
1
- export {}
1
+ export {};