Skip to content

Commit d7c0d35

Browse files
committed
fix d.st
1 parent 9d2d5bf commit d7c0d35

1 file changed

Lines changed: 36 additions & 3 deletions

File tree

packages/react-redux-loop/react-redux-loop.d.ts

Lines changed: 36 additions & 3 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)