mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-06 07:47:04 +00:00
Add definitions for redux-recycle (#13424)
* Add definitions for redux-recycle * Fix linter errors
This commit is contained in:
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
// Type definitions for redux-recycle 1.2
|
||||
// Project: https://github.com/omnidan/redux-recycle
|
||||
// Definitions by: Karol Janyst <https://github.com/LKay>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Reducer } from "redux";
|
||||
|
||||
export default function recycleState<A> (reducer: Reducer<A>, actions: string[], initialState?: A | Reducer<A>): Reducer<A>;
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"dependencies": {
|
||||
"redux": "^3.6.0"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
import { Reducer } from "redux";
|
||||
import recycleState from "redux-recycle";
|
||||
|
||||
const reducer: Reducer<any> = (state: any, action: any) => ({});
|
||||
const otherReducer: Reducer<any> = (state: any, action: any) => ({});
|
||||
|
||||
const resetReducer: Reducer<any> = recycleState(reducer, ["reset"], {});
|
||||
const resetToOtherReducer: Reducer<any> = recycleState(reducer, ["reset"], otherReducer);
|
||||
@@ -0,0 +1,19 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"target": "es6",
|
||||
"noImplicitAny": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"redux-recycle-tests.ts"
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user