Browse Source

added types

Daniel Zlotin 6 years ago
parent
commit
e20353435c
1 changed files with 4 additions and 4 deletions
  1. 4
    4
      lib/src/adapters/NativeEventsReceiver.ts

+ 4
- 4
lib/src/adapters/NativeEventsReceiver.ts View File

10
     this.emitter = new NativeEventEmitter(NativeModules.RNNEventEmitter);
10
     this.emitter = new NativeEventEmitter(NativeModules.RNNEventEmitter);
11
   }
11
   }
12
 
12
 
13
-  registerAppLaunched(callback): EventSubscription {
13
+  registerAppLaunched(callback: () => void): EventSubscription {
14
     return this.emitter.addListener('RNN.appLaunched', callback);
14
     return this.emitter.addListener('RNN.appLaunched', callback);
15
   }
15
   }
16
 
16
 
17
-  registerComponentDidAppear(callback): EventSubscription {
17
+  registerComponentDidAppear(callback: (componendId: string, componentName: string) => void): EventSubscription {
18
     return this.emitter.addListener('RNN.componentDidAppear', callback);
18
     return this.emitter.addListener('RNN.componentDidAppear', callback);
19
   }
19
   }
20
 
20
 
21
-  registerComponentDidDisappear(callback): EventSubscription {
21
+  registerComponentDidDisappear(callback: (componendId: string, componentName: string) => void): EventSubscription {
22
     return this.emitter.addListener('RNN.componentDidDisappear', callback);
22
     return this.emitter.addListener('RNN.componentDidDisappear', callback);
23
   }
23
   }
24
 
24
 
25
-  registerInteraction(callback): EventSubscription {
25
+  registerInteraction(callback: (name: string) => void): EventSubscription {
26
     return this.emitter.addListener('RNN.interaction', callback);
26
     return this.emitter.addListener('RNN.interaction', callback);
27
   }
27
   }
28
 }
28
 }