Comparing version 2.2.0-beta.9 to 2.2.0-beta.10
@@ -64,3 +64,3 @@ import { Store, Action, Reducer } from 'redux'; | ||
[K in keyof LogicType['actionCreators']]?: (state: ReducerType, payload: ReturnType<LogicType['actionCreators'][K]>['payload']) => ReducerType; | ||
} | { | ||
} & { | ||
[K in keyof LogicType['__keaTypeGenInternalReducerActions']]?: (state: ReducerType, payload: ReturnType<LogicType['__keaTypeGenInternalReducerActions'][K]>['payload']) => ReducerType; | ||
@@ -80,5 +80,5 @@ }; | ||
declare type ListenerDefinitionsForRecord<A extends Record<string, (...args: any) => any>> = { | ||
[K in keyof A]?: ((payload: ReturnType<A[K]>['payload'], breakpoint: BreakPointFunction, action: ReturnType<A[K]>, previousState: any) => void | Promise<void>) | (() => void | Promise<void>); | ||
[K in keyof A]?: (payload: ReturnType<A[K]>['payload'], breakpoint: BreakPointFunction, action: ReturnType<A[K]>, previousState: any) => void | Promise<void>; | ||
}; | ||
declare type ListenerDefinitions<LogicType extends Logic> = ListenerDefinitionsForRecord<LogicType['actionCreators']> | ListenerDefinitionsForRecord<LogicType['__keaTypeGenInternalReducerActions']>; | ||
declare type ListenerDefinitions<LogicType extends Logic> = ListenerDefinitionsForRecord<LogicType['actionCreators']> & ListenerDefinitionsForRecord<LogicType['__keaTypeGenInternalReducerActions']>; | ||
declare type SharedListenerDefinitions = Record<string, (payload: any, breakpoint: BreakPointFunction, action: any, previousState: any) => void | Promise<void>>; | ||
@@ -85,0 +85,0 @@ declare type WindowValuesDefinitions<LogicType extends Logic> = Record<string, (window: Window) => any>; |
@@ -63,3 +63,3 @@ import { Reducer, Store, Action as ReduxAction } from 'redux'; | ||
[K in keyof LogicType['actionCreators']]?: (state: ReducerType, payload: ReturnType<LogicType['actionCreators'][K]>['payload']) => ReducerType; | ||
} | { | ||
} & { | ||
[K in keyof LogicType['__keaTypeGenInternalReducerActions']]?: (state: ReducerType, payload: ReturnType<LogicType['__keaTypeGenInternalReducerActions'][K]>['payload']) => ReducerType; | ||
@@ -79,5 +79,5 @@ }; | ||
declare type ListenerDefinitionsForRecord<A extends Record<string, (...args: any) => any>> = { | ||
[K in keyof A]?: ((payload: ReturnType<A[K]>['payload'], breakpoint: BreakPointFunction, action: ReturnType<A[K]>, previousState: any) => void | Promise<void>) | (() => void | Promise<void>); | ||
[K in keyof A]?: (payload: ReturnType<A[K]>['payload'], breakpoint: BreakPointFunction, action: ReturnType<A[K]>, previousState: any) => void | Promise<void>; | ||
}; | ||
declare type ListenerDefinitions<LogicType extends Logic> = ListenerDefinitionsForRecord<LogicType['actionCreators']> | ListenerDefinitionsForRecord<LogicType['__keaTypeGenInternalReducerActions']>; | ||
declare type ListenerDefinitions<LogicType extends Logic> = ListenerDefinitionsForRecord<LogicType['actionCreators']> & ListenerDefinitionsForRecord<LogicType['__keaTypeGenInternalReducerActions']>; | ||
declare type SharedListenerDefinitions = Record<string, (payload: any, breakpoint: BreakPointFunction, action: any, previousState: any) => void | Promise<void>>; | ||
@@ -84,0 +84,0 @@ declare type WindowValuesDefinitions<LogicType extends Logic> = Record<string, (window: Window) => any>; |
{ | ||
"name": "kea", | ||
"version": "2.2.0-beta.9", | ||
"version": "2.2.0-beta.10", | ||
"description": "Smart front-end architecture", | ||
@@ -5,0 +5,0 @@ "author": "Marius Andra", |
@@ -71,15 +71,14 @@ import { Reducer, Store, Action as ReduxAction } from 'redux' | ||
type ReducerActions<LogicType extends Logic, ReducerType> = | ||
| { | ||
[K in keyof LogicType['actionCreators']]?: ( | ||
state: ReducerType, | ||
payload: ReturnType<LogicType['actionCreators'][K]>['payload'], | ||
) => ReducerType | ||
} | ||
| { | ||
[K in keyof LogicType['__keaTypeGenInternalReducerActions']]?: ( | ||
state: ReducerType, | ||
payload: ReturnType<LogicType['__keaTypeGenInternalReducerActions'][K]>['payload'], | ||
) => ReducerType | ||
} | ||
type ReducerActions<LogicType extends Logic, ReducerType> = { | ||
[K in keyof LogicType['actionCreators']]?: ( | ||
state: ReducerType, | ||
payload: ReturnType<LogicType['actionCreators'][K]>['payload'], | ||
) => ReducerType | ||
} & | ||
{ | ||
[K in keyof LogicType['__keaTypeGenInternalReducerActions']]?: ( | ||
state: ReducerType, | ||
payload: ReturnType<LogicType['__keaTypeGenInternalReducerActions'][K]>['payload'], | ||
) => ReducerType | ||
} | ||
@@ -125,15 +124,12 @@ type ReducerDefinitions<LogicType extends Logic> = { | ||
type ListenerDefinitionsForRecord<A extends Record<string, (...args: any) => any>> = { | ||
[K in keyof A]?: | ||
| (( | ||
payload: ReturnType<A[K]>['payload'], | ||
breakpoint: BreakPointFunction, | ||
action: ReturnType<A[K]>, | ||
previousState: any, | ||
) => void | Promise<void>) | ||
| (() => void | Promise<void>) | ||
[K in keyof A]?: ( | ||
payload: ReturnType<A[K]>['payload'], | ||
breakpoint: BreakPointFunction, | ||
action: ReturnType<A[K]>, | ||
previousState: any, | ||
) => void | Promise<void> | ||
} | ||
type ListenerDefinitions<LogicType extends Logic> = | ||
| ListenerDefinitionsForRecord<LogicType['actionCreators']> | ||
| ListenerDefinitionsForRecord<LogicType['__keaTypeGenInternalReducerActions']> | ||
type ListenerDefinitions<LogicType extends Logic> = ListenerDefinitionsForRecord<LogicType['actionCreators']> & | ||
ListenerDefinitionsForRecord<LogicType['__keaTypeGenInternalReducerActions']> | ||
@@ -140,0 +136,0 @@ type SharedListenerDefinitions = Record< |
479149
103
13995