Skip to content

Commit

Permalink
Merge pull request #1692 from reduxjs/feature/1.7-dep-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
markerikson authored Nov 5, 2021
2 parents c455fc2 + 11e64ea commit 4bab6d5
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 1,209 deletions.
8 changes: 4 additions & 4 deletions packages/toolkit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -100,12 +100,12 @@
],
"dependencies": {
"immer": "^9.0.6",
"redux": "^4.1.0",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0"
"redux": "^4.1.2",
"redux-thunk": "^2.4.0",
"reselect": "^4.1.2"
},
"peerDependencies": {
"react": "^16.14.0 || ^17.0.0",
"react": "^16.9.0 || ^17.0.0",
"react-redux": "^7.2.1"
},
"peerDependenciesMeta": {
Expand Down
15 changes: 6 additions & 9 deletions packages/toolkit/src/query/core/buildSelectors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,8 @@ export function buildSelectors<
function buildQuerySelector(
endpointName: string,
endpointDefinition: QueryDefinition<any, any, any, any>
): QueryResultSelectorFactory<any, RootState> {
return (queryArgs) => {
) {
return ((queryArgs: any) => {
const selectQuerySubState = createSelector(
selectInternalState,
(internalState) =>
Expand All @@ -173,14 +173,11 @@ export function buildSelectors<
]) ?? defaultQuerySubState
)
return createSelector(selectQuerySubState, withRequestFlags)
}
}) as QueryResultSelectorFactory<any, RootState>
}

function buildMutationSelector(): MutationResultSelectorFactory<
any,
RootState
> {
return (id) => {
function buildMutationSelector() {
return ((id) => {
let mutationId: string | typeof skipToken
if (typeof id === 'object') {
mutationId = getMutationCacheKey(id) ?? skipToken
Expand All @@ -195,7 +192,7 @@ export function buildSelectors<
: internalState?.mutations?.[mutationId]) ?? defaultMutationSubState
)
return createSelector(selectMutationSubstate, withRequestFlags)
}
}) as MutationResultSelectorFactory<any, RootState>
}

function selectInvalidatedBy(
Expand Down
Loading

0 comments on commit 4bab6d5

Please sign in to comment.