Skip to content

Commit f07b43b

Browse files
cellogtimdorr
authored andcommitted
export types, prepare TS config for migrating files (reduxjs#3537)
* fix config * export types * use export from, reorganize * fix stupid eslint rule breakage Former-commit-id: 4e4c111
1 parent c218bfc commit f07b43b

File tree

3 files changed

+32
-2
lines changed

3 files changed

+32
-2
lines changed

src/index.ts

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// functions
12
import createStore from './createStore'
23
import combineReducers from './combineReducers'
34
import bindActionCreators from './bindActionCreators'
@@ -6,6 +7,35 @@ import compose from './compose'
67
import warning from './utils/warning'
78
import __DO_NOT_USE__ActionTypes from './utils/actionTypes'
89

10+
// types
11+
// store
12+
export {
13+
Dispatch,
14+
Unsubscribe,
15+
Observable,
16+
Observer,
17+
Store,
18+
DeepPartial,
19+
StoreCreator,
20+
StoreEnhancer
21+
} from '..'
22+
// reducers
23+
export {
24+
CombinedState,
25+
PreloadedState,
26+
Reducer,
27+
ReducerFromReducersMapObject,
28+
StateFromReducersMapObject,
29+
ActionFromReducer,
30+
ActionFromReducersMapObject
31+
} from '..'
32+
// action creators
33+
export { ActionCreator, ActionCreatorsMapObject } from '..'
34+
// middleware
35+
export { MiddlewareAPI, Middleware } from '..'
36+
// actions
37+
export { Action, AnyAction } from '..'
38+
939
/*
1040
* This is a dummy function to check if the function name has been altered by minification.
1141
* If the function has been minified and NODE_ENV !== 'production', warn the user.

test/typescript/tsconfig.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"compilerOptions": {
3-
"lib": ["es2015", "dom"],
3+
"lib": ["es2017", "dom"],
44
"strict": true,
55
"baseUrl": "../..",
66
"paths": {

tsconfig.json.REMOVED.git-id

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
052d09d209c201be4d4cdbc8fcdf634b5172ab8c
1+
0abee9b5c3a10031fe5f1a563af699c66cbe8307

0 commit comments

Comments
 (0)