import { Middleware } from 'redux' ; import { Observable , Subscribable } from 'rxjs' ; import { AnyEventCreator , Event } from '../createEvent/createEvent.h' ; import { ReducersMap } from '../createReducer/createReducer.h' ; typeparam typeparam typeparam param event$ param state$ export type EventEpic < Payload , Meta , State > = ( event$ : Observable < Event < Payload , Meta > > , state$ : Observable < State > , staticApi : { dispatch : Dispatch < State > ; getState ( ) : State ; fromESObservable ( innerStream ) : any ; toESObservable ( outerStream ) : Subscribable < any > ; } ) => Subscribable < any > | void ; typeparam param event$ param state$ export type Epic < State > = EventEpic < any , any , State > ; export type WaitFor = Array < AnyEventCreator | string | { event : AnyEventCreator | string ; timeout ? : number ; condition ? : ( ) => boolean ; } > ; see typeparam typeparam typeparam export type Module < Api , State , Full extends Partial < State > = State > = { name : string ; dependencies ? : string [ ] ; events ? : Api ; api ? : Api ; waitFor ? : WaitFor ; reducers ? : ReducersMap < State > ; state ? : ReducersMap < State > ; epic ? : Epic < Partial < Full > > | Array < Epic < Partial < Full > > > ; epics ? : Epic < Partial < Full > > | Array < Epic < Partial < Full > > > ; useGlobalObservableConfig ? : boolean ; observableConfig ? : ObservableConfig < any > ; } ; typeparam typeparam typeparam typeparam export type ModuleFactory < Api , State , Full extends Partial < State > = { } , Extra = { } > = ( extraArgument : Extra ) => Module < Api , State , Full > ; typeparam typeparam typeparam typeparam private export type AnyModule < Api , State , Full extends Partial < State > , Extra > = ModuleFactory < Api , State , Full , Extra > | Module < Api , State , Full > ; export type Dispatch < State > = < T > ( event : T ) => T extends Subscribable < any > ? Promise < void > : T extends Thunk < State , infer R > ? R : T ; export type Thunk < State , Result > = ( getState : ( ) => State , dispatch : Dispatch < State > ) => Result ; export type ObservableConfig < Stream > = { fromESObservable ? : ( innerStream : Observable < any > ) => Stream ; toESObservable ? : ( outerStream : Stream ) => Observable < any > ; } ; typeparam typeparam export type Stapp < State , Api > = Subscribable < State > & { name : string ; api : Api ; dispatch : Dispatch < State > ; getState : ( ) => State ; ready : Promise < Partial < State > > ; disconnect : ( ) => void ; } ; export type StappApi < T extends Stapp < any , any > > = T extends Stapp < any , infer Api > ? Api : any ; export type StappState < T extends Stapp < any , any > > = T extends Stapp < infer State , any > ? State : any ; export type DevtoolsConfig = { name ? : string ; actionCreators ? : Array < ( ) => Event < any , any > > | { [ K ] : ( ) => Event < any , any > ; } ; latency ? : number ; maxAge ? : number ; serialize ? : { options : { date ? : boolean ; regex ? : boolean ; undefined ? : boolean ; nan ? : boolean ; infinity ? : boolean ; error ? : boolean ; symbol ? : boolean ; map ? : boolean ; set ? : boolean ; function ? : ( fn : Function ) => string ; } ; replacer ? : ( key : string , value : any ) => any ; reviver ? : ( key : string , value : any ) => any ; immutable ? : object ; refs ? : object [ ] ; } ; actionSanitizer ? : ( event : Event < any , any > ) => Event < any , any > ; stateSanitizer ? : ( state : any ) => any ; actionsBlacklist ? : string | string [ ] ; actionsWhitelist ? : string | string [ ] ; predicate ? : ( state : any , event : Event < any , any > ) => true ; shouldRecordChanges ? : boolean ; pauseActionType ? : string ; autoPause ? : boolean ; shouldStartLocked ? : boolean ; shouldHotReload ? : boolean ; shouldCatchErrors ? : string ; features ? : { pause ? : boolean ; lock ? : boolean ; persist ? : boolean ; export ? : boolean | 'custom' ; import ? : boolean | 'custom' ; jump ? : boolean ; skip ? : boolean ; reorder ? : boolean ; dispatch ? : boolean ; test ? : boolean ; } ; enableDevTools ? : ( ) => boolean ; } ; hidden export type CreateApp = { < A1 , S1 , E1 > ( config ) : Stapp < S1 , A1 > ; < A1 , S1 , E1 , A2 , S2 , E2 , Extra extends E1 & E2 , State extends S1 & S2 , Api extends A1 & A2 > ( config ) : Stapp < State , Api > ; < A1 , S1 , E1 , A2 , S2 , E2 , A3 , S3 , E3 , Extra extends E1 & E2 & E3 , State extends S1 & S2 & S3 , Api extends A1 & A2 & A3 > ( config ) : Stapp < State , Api > ; < A1 , S1 , E1 , A2 , S2 , E2 , A3 , S3 , E3 , A4 , S4 , E4 , Extra extends E1 & E2 & E3 & E4 , State extends S1 & S2 & S3 & S4 , Api extends A1 & A2 & A3 & A4 > ( config ) : Stapp < State , Api > ; < A1 , S1 , E1 , A2 , S2 , E2 , A3 , S3 , E3 , A4 , S4 , E4 , A5 , S5 , E5 , Extra extends E1 & E2 & E3 & E4 & E5 , State extends S1 & S2 & S3 & S4 & S5 , Api extends A1 & A2 & A3 & A4 & A5 > ( config ) : Stapp < State , Api > ; < A1 , S1 , E1 , A2 , S2 , E2 , A3 , S3 , E3 , A4 , S4 , E4 , A5 , S5 , E5 , A6 , S6 , E6 , Extra extends E1 & E2 & E3 & E4 & E5 & E6 , State extends S1 & S2 & S3 & S4 & S5 & S6 , Api extends A1 & A2 & A3 & A4 & A5 & A6 > ( config ) : Stapp < State , Api > ; < A1 , S1 , E1 , A2 , S2 , E2 , A3 , S3 , E3 , A4 , S4 , E4 , A5 , S5 , E5 , A6 , S6 , E6 , A7 , S7 , E7 , Extra extends E1 & E2 & E3 & E4 & E5 & E6 & E7 , State extends S1 & S2 & S3 & S4 & S5 & S6 & S7 , Api extends A1 & A2 & A3 & A4 & A5 & A6 & A7 > ( config ) : Stapp < State , Api > ; < A1 , S1 , E1 , A2 , S2 , E2 , A3 , S3 , E3 , A4 , S4 , E4 , A5 , S5 , E5 , A6 , S6 , E6 , A7 , S7 , E7 , A8 , S8 , E8 , Extra extends E1 & E2 & E3 & E4 & E5 & E6 & E7 & E8 , State extends S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 , Api extends A1 & A2 & A3 & A4 & A5 & A6 & A7 & A8 > ( config ) : Stapp < State , Api > ; < A1 , S1 , E1 , A2 , S2 , E2 , A3 , S3 , E3 , A4 , S4 , E4 , A5 , S5 , E5 , A6 , S6 , E6 , A7 , S7 , E7 , A8 , S8 , E8 , A9 , S9 , E9 , Extra extends E1 & E2 & E3 & E4 & E5 & E6 & E7 & E8 & E9 , State extends S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 & S9 , Api extends A1 & A2 & A3 & A4 & A5 & A6 & A7 & A8 & A9 > ( config ) : Stapp < State , Api > ; < A1 , S1 , E1 , A2 , S2 , E2 , A3 , S3 , E3 , A4 , S4 , E4 , A5 , S5 , E5 , A6 , S6 , E6 , A7 , S7 , E7 , A8 , S8 , E8 , A9 , S9 , E9 , A10 , S10 , E10 , Extra extends E1 & E2 & E3 & E4 & E5 & E6 & E7 & E8 & E9 & E10 , State extends S1 & S2 & S3 & S4 & S5 & S6 & S7 & S8 & S9 & S10 , Api extends A1 & A2 & A3 & A4 & A5 & A6 & A7 & A8 & A9 & A10 > ( config ) : Stapp < State , Api > ; } ;