WIP: reducer typescript

This commit is contained in:
Alex Gleason
2022-03-15 08:48:18 -05:00
parent 16266f7cb4
commit 27564dd360
9 changed files with 73 additions and 172 deletions

17
types/redux-immutable/index.d.ts vendored Normal file
View File

@ -0,0 +1,17 @@
// Type definitions for redux-immutable v4.0.0
// Project: https://github.com/gajus/redux-immutable
// Definitions by: Sebastian Sebald <https://github.com/sebald>
// Gavin Gregory <https://github.com/gavingregory>
// Kanitkorn Sujautra <https://github.com/lukyth>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.3
declare module 'redux-immutable' {
import { ReducersMapObject, Reducer, Action } from 'redux';
import { Collection, Record as ImmutableRecord } from 'immutable';
export function combineReducers<S, A extends Action, T>(reducers: ReducersMapObject<S, A>, getDefaultState?: () => Collection.Keyed<T, S>): Reducer<S, A>;
export function combineReducers<S, A extends Action>(reducers: ReducersMapObject<S, A>, getDefaultState?: () => Collection.Indexed<S>): Reducer<S, A>;
export function combineReducers<S>(reducers: ReducersMapObject<S, any>, getDefaultState?: () => Collection.Indexed<S>): Reducer<S>;
export function combineReducers<S>(reducers: ReducersMapObject<S, any>, getDefaultState?: () => ImmutableRecord<any>): Reducer<S>;
}