Skip to content

Commit

Permalink
improvement(types): add types for the whole store
Browse files Browse the repository at this point in the history
improves #43
  • Loading branch information
aneurysmjs committed Oct 10, 2019
1 parent e941284 commit 805178b
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/app/shared/types/index.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/* eslint-disable import/prefer-default-export */
import { Reducer } from 'redux';
import { ProductsStateType } from '~/store/modules/products/types';

export const PRODUCTS_NAMESPACE_KEY = 'PRODUCTS_NAMESPACE';

export const INIT_DYNO_STATE = 'INIT_DYNO_STATE';

export type FullStoreShape = {
[INIT_DYNO_STATE]: {};
[PRODUCTS_NAMESPACE_KEY]: ProductsStateType;
};

export type StoreShape = Partial<FullStoreShape>;
export type NamespaceKey = keyof StoreShape;
export type ReducerMap = Partial<{ [k in NamespaceKey]: Reducer<FullStoreShape[k]> }>;

0 comments on commit 805178b

Please sign in to comment.