From 3322f1c9aaf096bcbd32aa32bdaf027a194aa284 Mon Sep 17 00:00:00 2001 From: Matt Date: Sat, 18 Feb 2023 18:32:11 +0000 Subject: [PATCH] Fix type test --- packages/toolkit/src/entities/sorted_state_adapter.ts | 2 +- packages/toolkit/src/query/react/buildHooks.ts | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/toolkit/src/entities/sorted_state_adapter.ts b/packages/toolkit/src/entities/sorted_state_adapter.ts index 4bb745c6d3..96bb75da4a 100644 --- a/packages/toolkit/src/entities/sorted_state_adapter.ts +++ b/packages/toolkit/src/entities/sorted_state_adapter.ts @@ -78,7 +78,7 @@ export function createSortedStateAdapter( let appliedUpdates = false for (let update of updates) { - const entity = state.entities[update.id] + const entity: T | undefined = state.entities[update.id] if (!entity) { continue } diff --git a/packages/toolkit/src/query/react/buildHooks.ts b/packages/toolkit/src/query/react/buildHooks.ts index b6822a7478..076a7f02b3 100644 --- a/packages/toolkit/src/query/react/buildHooks.ts +++ b/packages/toolkit/src/query/react/buildHooks.ts @@ -1,6 +1,5 @@ -import type { AnyAction, ThunkAction, ThunkDispatch } from '@reduxjs/toolkit' +import type { AnyAction, Selector, ThunkAction, ThunkDispatch } from '@reduxjs/toolkit' import { createSelector } from '@reduxjs/toolkit' -import type { Selector } from '@reduxjs/toolkit' import type { DependencyList } from 'react' import { useCallback,