File tree Expand file tree Collapse file tree 5 files changed +43
-0
lines changed Expand file tree Collapse file tree 5 files changed +43
-0
lines changed Original file line number Diff line number Diff line change @@ -99,7 +99,9 @@ let styles =
99
99
- [ ] Keyboard
100
100
- [ ] LayoutAnimation
101
101
- [ ] Linking
102
+ - [x] NativeEventEmitter
102
103
- [ ] NativeMethodsMixin
104
+ - [x] NativeModules
103
105
- [ ] NetInfo
104
106
- [x] PanResponder
105
107
- [ ] PermissionsAndroid
Original file line number Diff line number Diff line change
1
+ type t ;
2
+
3
+ type emitterSubscription ;
4
+
5
+ external create : NativeModules . t => t =
6
+ "NativeEventEmitter" [@@ bs . new ] [@@ bs . module "react-native" ];
7
+
8
+ external addListener : t => string => (Js . Dict . t ' a => unit ) => emitterSubscription = "" [@@ bs . send ];
9
+
10
+ external removeAllListeners : t => string => unit = "" [@@ bs . send ];
11
+
12
+ external removeSubscription : t => emitterSubscription => unit = "" [@@ bs . send ];
13
+
14
+ module Subscription = {
15
+ external remove : emitterSubscription => unit => unit = "" [@@ bs . send ];
16
+ };
17
+
Original file line number Diff line number Diff line change
1
+ type t ;
2
+
3
+ type emitterSubscription ;
4
+
5
+ let create : NativeModules . t => t ;
6
+
7
+ let addListener : t => string => (Js . Dict . t ' a => unit ) => emitterSubscription ;
8
+
9
+ let removeAllListeners : t => string => unit ;
10
+
11
+ let removeSubscription : t => emitterSubscription => unit ;
12
+
13
+ module Subscription : {let remove : emitterSubscription => unit => unit ; };
Original file line number Diff line number Diff line change
1
+ type t ;
2
+
3
+ external nativeModules : Js . Dict . t ' a = "NativeModules" [@@ bs . module "react-native" ];
4
+
5
+ let _get name : t => Js . Dict . unsafeGet nativeModules name;
6
+
7
+ let get name => _get name;
8
+
Original file line number Diff line number Diff line change
1
+ type t ;
2
+
3
+ let get : string => t ;
You can’t perform that action at this time.
0 commit comments