updux/src/types.ts

17 lines
329 B
TypeScript
Raw Normal View History

2019-10-23 17:25:39 +00:00
2019-10-23 17:57:40 +00:00
export type Action = {
type: string,
payload?: any,
meta?: any,
}
2019-10-23 17:25:39 +00:00
export type Dictionary<T> = { [key: string]: T };
2019-10-23 21:01:48 +00:00
export type Mutation<S=any> = (payload: any, action: Action) => (state: S) => S ;
2019-10-23 17:28:13 +00:00
2019-10-23 19:55:12 +00:00
export type ActionCreator = (...args: any[] ) => Action;
2019-10-23 17:28:13 +00:00
export type UpduxConfig = Partial<{
2019-10-23 17:48:19 +00:00
subduxes: {}
2019-10-23 17:28:13 +00:00
}>;