Skip to content

Commit cfa11fe

Browse files
committed
refactor: optimize the writing
1 parent e4af53d commit cfa11fe

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/exports.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import { useSelector, createSelectorHook } from './hooks/useSelector'
2727
import { useStore, createStoreHook } from './hooks/useStore'
2828

2929
import shallowEqual from './utils/shallowEqual'
30+
import type { Subscription } from '../src/utils/Subscription'
3031

3132
export * from './types'
3233
export type {
@@ -46,6 +47,7 @@ export type {
4647
MapDispatchToPropsNonObject,
4748
MergeProps,
4849
ReactReduxContextValue,
50+
Subscription,
4951
}
5052
export {
5153
Provider,

test/hooks/useDispatch.spec.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,7 @@ import {
66
useDispatch,
77
createDispatchHook,
88
} from '../../src/index'
9-
import type { ProviderProps } from '../../src/'
10-
import type { ReactReduxContextValue } from '../../src/components/Context'
9+
import type { ProviderProps, ReactReduxContextValue } from '../../src/'
1110

1211
const store = createStore((c: number = 1): number => c + 1)
1312
const store2 = createStore((c: number = 1): number => c + 2)

test/hooks/useSelector.spec.tsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,12 @@ import {
1414
import { useReduxContext } from '../../src/hooks/useReduxContext'
1515
import type { FunctionComponent, DispatchWithoutAction, ReactNode } from 'react'
1616
import type { Store, AnyAction } from 'redux'
17-
import type { ProviderProps, TypedUseSelectorHook } from '../../src/'
18-
import type { Subscription } from '../../src/utils/Subscription'
19-
import type { ReactReduxContextValue } from '../../src/components/Context'
17+
import type {
18+
ProviderProps,
19+
TypedUseSelectorHook,
20+
ReactReduxContextValue,
21+
Subscription,
22+
} from '../../src/'
2023

2124
describe('React', () => {
2225
describe('hooks', () => {

0 commit comments

Comments
 (0)