Skip to content

Instantly share code, notes, and snippets.

@ddoronin
Created April 3, 2018 03:37
Show Gist options
  • Save ddoronin/8f940639ff15f7589777cf06ad8cc055 to your computer and use it in GitHub Desktop.
Save ddoronin/8f940639ff15f7589777cf06ad8cc055 to your computer and use it in GitHub Desktop.
TypeScript Redux Reducer Store
import { Reducer } from 'redux';
export type ReducerState<S> = {
[P in keyof S]: Reducer<S[P]>
};
/* Example
interface IState {
files: string[]
}
ReducerState<IState> will be
interface IState {
files: Reducer<string[]>
}
*/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment