Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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