redux-batched-actions: Provides its own types (#15650)

This commit is contained in:
Andy
2017-04-17 09:36:40 -07:00
committed by GitHub
parent 31116e82a6
commit e5b3078d7b
6 changed files with 6 additions and 62 deletions
+6
View File
@@ -396,6 +396,12 @@
"sourceRepoURL": "https://github.com/reactjs/redux",
"asOfVersion": "3.6.0"
},
{
"libraryName": "redux-batched-actions",
"typingsPackageName": "redux-batched-actions",
"sourceRepoURL": "https://github.com/tshelburne/redux-batched-actions",
"asOfVersion": "0.1.5"
},
{
"libraryName": "redux-persist",
"typingsPackageName": "redux-persist",
-20
View File
@@ -1,20 +0,0 @@
// Type definitions for redux-batched-actions 0.1
// Project: https://github.com/tshelburne/redux-batched-actions
// Definitions by: Chad Burggraf <https://github.com/ChadBurggraf>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import { Action, Reducer } from 'redux';
export as namespace ReduxBatchedActions;
/**
* Batching action creator that creates a higher-order
* action from an array of actions.
*/
export function batchActions<A extends Action>(actions: A[]): Action;
/**
* Creates a higher-order reducer that enables batching
* actions for the given reducer.
*/
export function enableBatching<S>(reducer: Reducer<S>): Reducer<S>;
-5
View File
@@ -1,5 +0,0 @@
{
"dependencies": {
"redux": "^3.6.0"
}
}
@@ -1,14 +0,0 @@
import { Reducer, createStore } from 'redux';
import { Action, createAction } from 'redux-actions';
import { enableBatching, batchActions } from 'redux-batched-actions';
const doThing = createAction('DO_THING');
const doOther = createAction('DO_OTHER');
const reducer = (state: any = {}, action: Action<any>): any => {
return state;
};
const store = createStore(enableBatching(reducer), {});
store.dispatch(batchActions([doThing(), doOther()]));
-22
View File
@@ -1,22 +0,0 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"redux-batched-actions-tests.ts"
]
}
-1
View File
@@ -1 +0,0 @@
{ "extends": "dtslint/dt.json" }