File tree 1 file changed +34
-0
lines changed
packages/reactotron-react-native 1 file changed +34
-0
lines changed Original file line number Diff line number Diff line change @@ -47,6 +47,35 @@ declare module 'reactotron-react-native' {
47
47
overlay ?: false
48
48
}
49
49
50
+ export interface ReactotronCommand {
51
+ /**
52
+ * The type of command.
53
+ */
54
+ type : string
55
+ /**
56
+ * The data belonging to the command.
57
+ */
58
+ payload : any
59
+ }
60
+
61
+ export interface ReactotronPlugin {
62
+ features : any
63
+ /**
64
+ * Fires when a command from the reactotron app arrives.
65
+ */
66
+ onCommand : ( command : ReactotronCommand ) => void
67
+ /**
68
+ * Fires when connecting to the reactotron app.
69
+ */
70
+ onConnect : ( ) => void
71
+ /**
72
+ * Fires when disconnected from the reactotron app.
73
+ */
74
+ onDisconnect : ( ) => void
75
+ }
76
+
77
+ // export type ReactotronUseMiddleware = (tron?: Reactotron) => ReactotronMiddleware
78
+
50
79
/**
51
80
* Reactotron.
52
81
*/
@@ -66,6 +95,11 @@ declare module 'reactotron-react-native' {
66
95
*/
67
96
useReactNative ( options ?: ReactotronUseReactNativeOptions ) : Reactotron
68
97
98
+ /**
99
+ * Uses some generic middleware.
100
+ */
101
+ use ( middleware : ( tron : Reactotron ) => void ) : Reactotron
102
+
69
103
/**
70
104
* Clears the Reactotron app.
71
105
*/
You can’t perform that action at this time.
0 commit comments