File tree Expand file tree Collapse file tree
packages/react-redux-loop Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,8 +2,41 @@ declare module 'react-redux-loop' {
22
33 import * as React from 'react' ;
44
5- export class ReduxLoop extends React . Component < {
6- children : ( event : any ) => void ;
7- } > {
5+ interface Event {
6+ type : string ,
7+ payload : any
88 }
9+
10+ type RenderFn = ( event : Event ) => void ;
11+
12+ interface LoopProps {
13+ children : RenderFn
14+ }
15+
16+ interface TriggerProps {
17+ when : string ,
18+ then : RenderFn
19+ }
20+
21+ /**
22+ * Decalarative way to monitor all redux actions
23+ */
24+ export class ReduxLoop extends React . Component < LoopProps > { }
25+
26+ /**
27+ * Declarative way to react to redux actions
28+ */
29+ export class ReduxTrigger extends React . Component < TriggerProps > { }
30+
31+ /**
32+ * Redux-loop middleware
33+ */
34+ export const loopMiddleware : ( store : any ) => any ;
35+
36+ /**
37+ * HOC to make Redux-reactive component
38+ * @param {"react-redux-loop".RenderFn } callback
39+ * @return {React.ComponentType<any> }
40+ */
41+ export default function reduxLoop ( callback : RenderFn ) : React . ComponentType < any > ;
942}
You can’t perform that action at this time.
0 commit comments