@@ -18,10 +18,10 @@ import {
1818 useStore ,
1919} from '../../src/index'
2020
21- import type { AppDispatch , AppStore , RootState } from './counterApp'
21+ import type { AppDispatch , RootState } from './counterApp'
2222import { incrementAsync } from './counterApp'
2323
24- import { exactType , expectExactType , expectType } from '../typeTestHelpers'
24+ import { expectExactType , expectType } from '../typeTestHelpers'
2525
2626function preTypedHooksSetup ( ) {
2727 // Standard hooks setup
@@ -237,43 +237,3 @@ function testCreateHookFunctions() {
237237 > ( createSelectorHook ( Context ) )
238238 expectType < ( ) => Store < RootState , RootAction > > ( createStoreHook ( Context ) )
239239}
240-
241- function preTypedHooksSetupWithTypes ( ) {
242- const useAppDispatch = useDispatch . withTypes < AppDispatch > ( )
243-
244- const useAppSelector = useSelector . withTypes < RootState > ( )
245-
246- const useAppStore = useStore . withTypes < AppStore > ( )
247-
248- function CounterComponent ( ) {
249- useAppSelector ( ( state ) => state . counter )
250-
251- const dispatch = useAppDispatch ( )
252-
253- expectExactType < AppDispatch > ( dispatch )
254-
255- const store = useAppStore ( )
256-
257- expectExactType < AppStore > ( store )
258-
259- expectExactType < AppDispatch > ( store . dispatch )
260-
261- const state = store . getState ( )
262-
263- expectExactType < RootState > ( state )
264-
265- expectExactType < number > ( state . counter )
266-
267- store . dispatch ( incrementAsync ( 1 ) )
268-
269- exactType ( store . dispatch , dispatch )
270-
271- return (
272- < button
273- onClick = { ( ) => {
274- dispatch ( incrementAsync ( 1 ) )
275- } }
276- />
277- )
278- }
279- }
0 commit comments