Skip to content

Commit 6d7de27

Browse files
committed
fixes to config
1 parent dbb4dc2 commit 6d7de27

File tree

7 files changed

+100
-10
lines changed

7 files changed

+100
-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/

package-lock.json

Lines changed: 38 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@
8787
"rollup-plugin-node-resolve": "^5.2.0",
8888
"rollup-plugin-replace": "^2.2.0",
8989
"rollup-plugin-terser": "^5.1.1",
90+
"rollup-plugin-typescript2": "^0.22.1",
9091
"rxjs": "^6.5.2",
9192
"typescript": "^3.5.3",
9293
"typings-tester": "^0.3.2"

rollup.config.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import nodeResolve from 'rollup-plugin-node-resolve'
22
import babel from 'rollup-plugin-babel'
33
import replace from 'rollup-plugin-replace'
44
import { terser } from 'rollup-plugin-terser'
5+
import typescript from 'rollup-plugin-typescript2'
56

67
import pkg from './package.json'
78

@@ -18,6 +19,7 @@ export default [
1819
nodeResolve({
1920
extensions: ['.ts']
2021
}),
22+
typescript(),
2123
babel()
2224
]
2325
},
@@ -34,6 +36,7 @@ export default [
3436
nodeResolve({
3537
extensions: ['.ts']
3638
}),
39+
typescript(),
3740
babel()
3841
]
3942
},
@@ -46,6 +49,7 @@ export default [
4649
nodeResolve({
4750
extensions: ['.ts']
4851
}),
52+
typescript(),
4953
replace({
5054
'process.env.NODE_ENV': JSON.stringify('production')
5155
}),
@@ -76,6 +80,7 @@ export default [
7680
nodeResolve({
7781
extensions: ['.ts']
7882
}),
83+
typescript(),
7984
babel({
8085
exclude: 'node_modules/**'
8186
}),
@@ -98,6 +103,7 @@ export default [
98103
nodeResolve({
99104
extensions: ['.ts']
100105
}),
106+
typescript(),
101107
babel({
102108
exclude: 'node_modules/**'
103109
}),

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)