Skip to content

Commit af2b638

Browse files
committed
Remove unused imports
1 parent 3ebcb91 commit af2b638

File tree

9 files changed

+39
-43
lines changed

9 files changed

+39
-43
lines changed

packages/toolkit/src/entities/tests/state_selectors.test.ts

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
import { createDraftSafeSelectorCreator } from '../../createDraftSafeSelector'
2-
import type { EntityAdapter, EntityState } from '../index'
3-
import { createEntityAdapter } from '../index'
4-
import type { EntitySelectors } from '../models'
1+
import type {
2+
EntityAdapter,
3+
EntitySelectors,
4+
EntityState,
5+
Selector,
6+
} from '@reduxjs/toolkit'
7+
import {
8+
createDraftSafeSelectorCreator,
9+
createEntityAdapter,
10+
createSelector,
11+
} from '@reduxjs/toolkit'
512
import type { BookModel } from './fixtures/book'
613
import { AClockworkOrange, AnimalFarm, TheGreatGatsby } from './fixtures/book'
7-
import type { Selector } from 'reselect'
8-
import { createSelector, weakMapMemoize } from 'reselect'
9-
import { vi } from 'vitest'
1014

1115
describe('Entity State Selectors', () => {
1216
describe('Composed Selectors', () => {

packages/toolkit/src/immutableStateInvariantMiddleware.ts

-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import type { Middleware } from 'redux'
22
import type { IgnorePaths } from './serializableStateInvariantMiddleware'
3-
import type { AnyObject } from './tsHelpers'
43
import { getTimeMeasureUtils } from './utils'
54

65
type EntryProcessor = (key: string, value: any) => any

packages/toolkit/src/listenerMiddleware/tests/fork.test.ts

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
import type { EnhancedStore } from '@reduxjs/toolkit'
2-
import { configureStore, createAction, createSlice } from '@reduxjs/toolkit'
3-
4-
import type { PayloadAction } from '@reduxjs/toolkit'
51
import type {
6-
AbortSignalWithReason,
72
ForkedTaskExecutor,
3+
PayloadAction,
84
TaskResult,
9-
} from '../types'
10-
import { TaskAbortError, createListenerMiddleware } from '../index'
5+
} from '@reduxjs/toolkit'
6+
import {
7+
TaskAbortError,
8+
configureStore,
9+
createAction,
10+
createListenerMiddleware,
11+
createSlice,
12+
} from '@reduxjs/toolkit'
1113
import {
1214
listenerCancelled,
1315
listenerCompleted,
1416
taskCancelled,
1517
taskCompleted,
1618
} from '../exceptions'
19+
import type { AbortSignalWithReason } from '../types'
1720

1821
function delay(ms: number) {
1922
return new Promise((resolve) => setTimeout(resolve, ms))

packages/toolkit/src/listenerMiddleware/tests/useCases.test.ts

+3-8
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
1+
import type { PayloadAction } from '@reduxjs/toolkit'
12
import {
3+
TaskAbortError,
24
configureStore,
35
createAction,
6+
createListenerMiddleware,
47
createSlice,
5-
isAnyOf,
68
} from '@reduxjs/toolkit'
79

8-
import type { PayloadAction } from '@reduxjs/toolkit'
9-
10-
import { createListenerMiddleware } from '../index'
11-
12-
import type { TypedAddListener } from '../index'
13-
import { TaskAbortError } from '../exceptions'
14-
1510
interface CounterState {
1611
value: number
1712
}

packages/toolkit/src/query/core/buildMiddleware/invalidationByTags.ts

+7-9
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,23 @@
1-
import {
2-
isAnyOf,
3-
isFulfilled,
4-
isRejected,
5-
isRejectedWithValue,
6-
} from '../rtkImports'
7-
81
import type {
92
EndpointDefinitions,
103
FullTagDescription,
114
} from '../../endpointDefinitions'
125
import { calculateProvidedBy } from '../../endpointDefinitions'
6+
import { countObjectKeys } from '../../utils/countObjectKeys'
137
import type { CombinedState, QueryCacheKey } from '../apiState'
148
import { QueryStatus } from '../apiState'
159
import { calculateProvidedByThunk } from '../buildThunks'
10+
import {
11+
isAnyOf,
12+
isFulfilled,
13+
isRejected,
14+
isRejectedWithValue,
15+
} from '../rtkImports'
1616
import type {
1717
ApiMiddlewareInternalHandler,
1818
InternalHandlerBuilder,
19-
InternalMiddlewareState,
2019
SubMiddlewareApi,
2120
} from './types'
22-
import { countObjectKeys } from '../../utils/countObjectKeys'
2321

2422
export const buildInvalidationByTagsHandler: InternalHandlerBuilder = ({
2523
reducerPath,

packages/toolkit/src/query/core/buildMiddleware/polling.ts

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import { QueryStatus } from '../apiState'
77
import type {
88
ApiMiddlewareInternalHandler,
99
InternalHandlerBuilder,
10-
InternalMiddlewareState,
1110
QueryStateMeta,
1211
SubMiddlewareApi,
1312
TimeoutId,

packages/toolkit/src/query/core/setupListeners.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
import type {
2-
ActionCreatorWithoutPayload,
3-
ThunkDispatch, // Workaround for API-Extractor
4-
} from '@reduxjs/toolkit'
1+
import type { ThunkDispatch } from '@reduxjs/toolkit'
52
import { createAction } from './rtkImports'
63

74
export const onFocus = /* @__PURE__ */ createAction('__rtkq/focused')

packages/toolkit/src/query/tests/fetchBaseQuery.test.tsx

-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { createSlice } from '@reduxjs/toolkit'
22
import { createApi, fetchBaseQuery } from '@reduxjs/toolkit/query'
33
import { headersToObject } from 'headers-polyfill'
44
import { HttpResponse, delay, http } from 'msw'
5-
// @ts-ignore
65
import nodeFetch from 'node-fetch'
76
import queryString from 'query-string'
87
import { vi } from 'vitest'

packages/toolkit/src/tests/autoBatchEnhancer.test.ts

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1-
import { configureStore } from '../configureStore'
2-
import { createSlice } from '../createSlice'
3-
import type { AutoBatchOptions } from '../autoBatchEnhancer'
4-
import { autoBatchEnhancer, prepareAutoBatched } from '../autoBatchEnhancer'
5-
import { delay } from '../utils'
1+
import type { AutoBatchOptions } from '@reduxjs/toolkit'
2+
import {
3+
configureStore,
4+
createSlice,
5+
prepareAutoBatched,
6+
} from '@reduxjs/toolkit'
67
import { debounce } from 'lodash'
8+
import { delay } from '../utils'
79

810
interface CounterState {
911
value: number

0 commit comments

Comments
 (0)