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 @@ -20,8 +20,15 @@ let inactive: t;
2020external currentState: t = "currentState";
2121
2222[@bs.scope "AppState"] [@bs.module "react-native"]
23- external addEventListener: (string, unit => unit) => EventSubscription.t = "";
23+ external addEventListener:
24+ ([@bs.string] [ | `change(t => unit) | `memoryWarning(unit => unit)]) =>
25+ EventSubscription.t =
26+ "";
2427
2528[@bs.scope "AppState"] [@bs.module "react-native"]
26- external removeEventListener: (string, unit => unit) => unit = "";
29+ external removeEventListener:
30+ ([@bs.string] [ | `change(t => unit) | `memoryWarning(unit => unit)]) =>
31+ unit =
32+ "";
33+
2734```
Original file line number Diff line number Diff line change @@ -13,7 +13,13 @@ let inactive = "inactive";
1313external currentState : t = "currentState" ;
1414
1515[@ bs . scope "AppState" ] [@ bs . module "react-native" ]
16- external addEventListener : (string , unit => unit ) => EventSubscription . t = "" ;
16+ external addEventListener :
17+ ([@ bs . string ] [ | ` change (t => unit ) | ` memoryWarning (unit => unit )] ) =>
18+ EventSubscription . t =
19+ "" ;
1720
1821[@ bs . scope "AppState" ] [@ bs . module "react-native" ]
19- external removeEventListener : (string , unit => unit ) => unit = "" ;
22+ external removeEventListener :
23+ ([@ bs . string ] [ | ` change (t => unit ) | ` memoryWarning (unit => unit )] ) =>
24+ unit =
25+ "" ;
Original file line number Diff line number Diff line change @@ -13,7 +13,13 @@ let inactive: t;
1313external currentState : t = "currentState" ;
1414
1515[@ bs . scope "AppState" ] [@ bs . module "react-native" ]
16- external addEventListener : (string , unit => unit ) => EventSubscription . t = "" ;
16+ external addEventListener :
17+ ([@ bs . string ] [ | ` change (t => unit ) | ` memoryWarning (unit => unit )] ) =>
18+ EventSubscription . t =
19+ "" ;
1720
1821[@ bs . scope "AppState" ] [@ bs . module "react-native" ]
19- external removeEventListener : (string , unit => unit ) => unit = "" ;
22+ external removeEventListener :
23+ ([@ bs . string ] [ | ` change (t => unit ) | ` memoryWarning (unit => unit )] ) =>
24+ unit =
25+ "" ;
You can’t perform that action at this time.
0 commit comments