Daniel Zlotin пре 6 година
родитељ
комит
5bc414affb
1 измењених фајлова са 7 додато и 7 уклоњено
  1. 7
    7
      lib/src/events/EventsRegistry.ts

+ 7
- 7
lib/src/events/EventsRegistry.ts Прегледај датотеку

@@ -1,25 +1,25 @@
1
-import { EventSubscription } from '../adapters/NativeEventsReceiver';
1
+import { EventSubscription, NativeEventsReceiver } from '../adapters/NativeEventsReceiver';
2 2
 
3 3
 export class EventsRegistry {
4
-  private nativeEventsReceiver;
4
+  private nativeEventsReceiver: NativeEventsReceiver;
5 5
 
6
-  constructor(nativeEventsReceiver) {
6
+  constructor(nativeEventsReceiver: NativeEventsReceiver) {
7 7
     this.nativeEventsReceiver = nativeEventsReceiver;
8 8
   }
9 9
 
10
-  public appLaunched(callback): EventSubscription {
10
+  public appLaunched(callback: () => void): EventSubscription {
11 11
     return this.nativeEventsReceiver.registerAppLaunched(callback);
12 12
   }
13 13
 
14
-  public componentDidAppear(callback): EventSubscription {
14
+  public componentDidAppear(callback: (componendId: string, componentName: string) => void): EventSubscription {
15 15
     return this.nativeEventsReceiver.registerComponentDidAppear(callback);
16 16
   }
17 17
 
18
-  public componentDidDisappear(callback): EventSubscription {
18
+  public componentDidDisappear(callback: (componendId: string, componentName: string) => void): EventSubscription {
19 19
     return this.nativeEventsReceiver.registerComponentDidDisappear(callback);
20 20
   }
21 21
 
22
-  public interaction(callback): EventSubscription {
22
+  public interaction(callback: (name: string) => void): EventSubscription {
23 23
     return this.nativeEventsReceiver.registerInteraction(callback);
24 24
   }
25 25
 }