Skip to content

Commit 076d850

Browse files
committed
fixes to config
1 parent b88f3d5 commit 076d850

File tree

5 files changed

+57
-10
lines changed

5 files changed

+57
-10
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ dist
55
lib
66
es
77
coverage
8+
# used by rollup-plugin-typescript2
9+
.rpt2_cache/
810

911
website/translated_docs
1012
website/build/

rollup.config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import babel from 'rollup-plugin-babel'
44
import replace from 'rollup-plugin-replace'
55
import typescript from 'rollup-plugin-typescript2'
66
import { terser } from 'rollup-plugin-terser'
7+
import typescript from 'rollup-plugin-typescript2'
78

89
import pkg from './package.json'
910

@@ -54,6 +55,7 @@ export default [
5455
nodeResolve({
5556
extensions: ['.ts']
5657
}),
58+
typescript(),
5759
replace({
5860
'process.env.NODE_ENV': JSON.stringify('production')
5961
}),

src/index.ts

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,31 @@
1+
import {
2+
Dispatch,
3+
Unsubscribe,
4+
Observable,
5+
Observer,
6+
Store,
7+
DeepPartial,
8+
StoreCreator,
9+
StoreEnhancer
10+
} from '..'
111
import createStore from './createStore'
12+
import {
13+
CombinedState,
14+
PreloadedState,
15+
Reducer,
16+
ReducerFromReducersMapObject,
17+
StateFromReducersMapObject,
18+
ActionFromReducer,
19+
ActionFromReducersMapObject
20+
} from '..'
221
import combineReducers from './combineReducers'
22+
import { ActionCreator, ActionCreatorsMapObject } from '..'
323
import bindActionCreators from './bindActionCreators'
24+
import { MiddlewareAPI, Middleware } from '..'
425
import applyMiddleware from './applyMiddleware'
526
import compose from './compose'
627
import warning from './utils/warning'
28+
import { Action, AnyAction } from '..'
729
import __DO_NOT_USE__ActionTypes from './utils/actionTypes'
830

931
/*
@@ -27,6 +49,34 @@ if (
2749
}
2850

2951
export {
52+
// types
53+
// actions
54+
Action,
55+
AnyAction,
56+
// action creators
57+
ActionCreator,
58+
ActionCreatorsMapObject,
59+
// reducers
60+
CombinedState,
61+
PreloadedState,
62+
Reducer,
63+
ReducerFromReducersMapObject,
64+
StateFromReducersMapObject,
65+
ActionFromReducer,
66+
ActionFromReducersMapObject,
67+
// middleware
68+
MiddlewareAPI,
69+
Middleware,
70+
// store
71+
Dispatch,
72+
Unsubscribe,
73+
Observable,
74+
Observer,
75+
Store,
76+
DeepPartial,
77+
StoreCreator,
78+
StoreEnhancer,
79+
// things
3080
createStore,
3181
combineReducers,
3282
bindActionCreators,

test/applyMiddleware.spec.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
1-
import {
2-
createStore,
3-
applyMiddleware,
4-
Middleware,
5-
Dispatch,
6-
AnyAction,
7-
Action
8-
} from '..'
1+
import { createStore, applyMiddleware, Middleware, AnyAction, Action } from '..'
92
import * as reducers from './helpers/reducers'
103
import { addTodo, addTodoAsync, addTodoIfEmpty } from './helpers/actionCreators'
114
import { thunk } from './helpers/middleware'

tsconfig.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
// "allowJs": true /* Allow javascript files to be compiled. */,
1111
// "checkJs": true, /* Report errors in .js files. */
1212
"jsx": "react" /* Specify JSX code generation: 'preserve', 'react-native', or 'react'. */,
13-
"declaration": true /* Generates corresponding '.d.ts' file. */,
14-
"declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
13+
// "declaration": true /* Generates corresponding '.d.ts' file. */,
14+
// "declarationMap": true /* Generates a sourcemap for each corresponding '.d.ts' file. */,
1515
"sourceMap": true /* Generates corresponding '.map' file. */,
1616
// "outFile": "./", /* Concatenate and emit output to single file. */
1717
// "outDir": "." /* Redirect output structure to the directory. */,

0 commit comments

Comments
 (0)