File tree Expand file tree Collapse file tree
reason-react-native/src/apis Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ external currentState: t = "";
2222[@bs.scope "AppState"] [@bs.module "react-native"]
2323external addEventListener:
2424 ([@bs.string] [ | `change(t => unit) | `memoryWarning(unit => unit)]) =>
25- unit =
25+ EventSubscription.t =
2626 "";
2727
2828[@bs.scope "AppState"] [@bs.module "react-native"]
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ external currentState: t = "";
1515[@ bs . scope "AppState" ] [@ bs . module "react-native" ]
1616external addEventListener :
1717 ([@ bs . string ] [ | ` change (t => unit ) | ` memoryWarning (unit => unit )] ) =>
18- unit =
18+ EventSubscription . t =
1919 "" ;
2020
2121[@ bs . scope "AppState" ] [@ bs . module "react-native" ]
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ external currentState: t = "";
1515[@ bs . scope "AppState" ] [@ bs . module "react-native" ]
1616external addEventListener :
1717 ([@ bs . string ] [ | ` change (t => unit ) | ` memoryWarning (unit => unit )] ) =>
18- unit =
18+ EventSubscription . t =
1919 "" ;
2020
2121[@ bs . scope "AppState" ] [@ bs . module "react-native" ]
Original file line number Diff line number Diff line change @@ -5,13 +5,14 @@ wip: true
55---
66
77``` reason
8+ type remove = {. "remove": unit => unit};
9+
810[@bs.scope "BackHandler"] [@bs.module "react-native"]
911external exitApp: unit => unit = "";
1012
1113[@bs.scope "BackHandler"] [@bs.module "react-native"]
1214external addEventListener:
13- ([@bs.string] [ | `backPress | `hardwareBackPress], unit => bool) =>
14- EventSubscription.t =
15+ ([@bs.string] [ | `backPress | `hardwareBackPress], unit => bool) => remove =
1516 "";
1617
1718[@bs.scope "BackHandler"] [@bs.module "react-native"]
Original file line number Diff line number Diff line change 1+ type remove = {. "remove": unit => unit };
2+
13[@ bs . scope "BackHandler" ] [@ bs . module "react-native" ]
24external exitApp : unit => unit = "" ;
35
46[@ bs . scope "BackHandler" ] [@ bs . module "react-native" ]
57external addEventListener :
6- ([@ bs . string ] [ | ` backPress | ` hardwareBackPress ] , unit => bool ) =>
7- EventSubscription . t =
8+ ([@ bs . string ] [ | ` backPress | ` hardwareBackPress ] , unit => bool ) => remove =
89 "" ;
910
1011[@ bs . scope "BackHandler" ] [@ bs . module "react-native" ]
Original file line number Diff line number Diff line change @@ -49,9 +49,11 @@ type info = {
4949 "effectiveType": EffectiveConnectionType.t,
5050};
5151
52+ type remove = {. "remove": unit => unit};
53+
5254[@bs.module "react-native"] [@bs.scope "NetInfo"]
5355external addEventListener:
54- ([@bs.string] [ | `connectionChange], info => unit) => EventSubscription.t =
56+ ([@bs.string] [ | `connectionChange], info => unit) => remove =
5557 "";
5658
5759[@bs.module "react-native"] [@bs.scope "NetInfo"]
@@ -68,7 +70,7 @@ external getConnectionInfo: unit => Js.Promise.t(info) = "";
6870module IsConnected = {
6971 [@bs.module "react-native"] [@bs.scope ("NetInfo", "isConnected")]
7072 external addEventListener:
71- ([@bs.string] [ | `connectionChange], bool => unit) => EventSubscription.t =
73+ ([@bs.string] [ | `connectionChange], bool => unit) => remove =
7274 "";
7375
7476 [@bs.module "react-native"] [@bs.scope ("NetInfo", "isConnected")]
Original file line number Diff line number Diff line change @@ -42,9 +42,11 @@ type info = {
4242 "effectiveType": EffectiveConnectionType . t ,
4343};
4444
45+ type remove = {. "remove": unit => unit };
46+
4547[@ bs . module "react-native" ] [@ bs . scope "NetInfo" ]
4648external addEventListener :
47- ([@ bs . string ] [ | ` connectionChange ] , info => unit ) => EventSubscription . t =
49+ ([@ bs . string ] [ | ` connectionChange ] , info => unit ) => remove =
4850 "" ;
4951
5052[@ bs . module "react-native" ] [@ bs . scope "NetInfo" ]
@@ -61,7 +63,7 @@ external getConnectionInfo: unit => Js.Promise.t(info) = "";
6163module IsConnected = {
6264 [@ bs . module "react-native" ] [@ bs . scope ("NetInfo" , "isConnected" )]
6365 external addEventListener :
64- ([@ bs . string ] [ | ` connectionChange ] , bool => unit ) => EventSubscription . t =
66+ ([@ bs . string ] [ | ` connectionChange ] , bool => unit ) => remove =
6567 "" ;
6668
6769 [@ bs . module "react-native" ] [@ bs . scope ("NetInfo" , "isConnected" )]
Original file line number Diff line number Diff line change @@ -42,9 +42,11 @@ type info = {
4242 "_type": ConnectionType . t ,
4343};
4444
45+ type remove = {. "remove": unit => unit };
46+
4547[@ bs . module "react-native" ] [@ bs . scope "NetInfo" ]
4648external addEventListener :
47- ([@ bs . string ] [ | ` connectionChange ] , info => unit ) => EventSubscription . t =
49+ ([@ bs . string ] [ | ` connectionChange ] , info => unit ) => remove =
4850 "" ;
4951
5052[@ bs . module "react-native" ] [@ bs . scope "NetInfo" ]
@@ -61,7 +63,7 @@ external getConnectionInfo: unit => Js.Promise.t(info) = "";
6163module IsConnected : {
6264 [@ bs . module "react-native" ] [@ bs . scope ("NetInfo" , "isConnected" )]
6365 external addEventListener :
64- ([@ bs . string ] [ | ` connectionChange ] , bool => unit ) => EventSubscription . t =
66+ ([@ bs . string ] [ | ` connectionChange ] , bool => unit ) => remove =
6567 "" ;
6668
6769 [@ bs . module "react-native" ] [@ bs . scope ("NetInfo" , "isConnected" )]
You can’t perform that action at this time.
0 commit comments