Skip to content

Commit f4d2dc1

Browse files
cknittMoOx
authored andcommitted
reason-react-native: Add AppRegistry.registerHeadlessTask (#560)
1 parent 19dba53 commit f4d2dc1

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

reason-react-native/src/apis/AppRegistry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ wip: true
99
external registerComponent: (string, unit => React.component('a)) => unit =
1010
"";
1111
12+
type task('data) = 'data => Js.Promise.t(unit);
13+
14+
[@bs.module "react-native"] [@bs.scope "AppRegistry"]
15+
external registerHeadlessTask: (string, unit => task('data)) => unit = "";
16+
1217
// react-native-web
1318
type app = {
1419
.

reason-react-native/src/apis/AppRegistry.re

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
external registerComponent: (string, unit => React.component('a)) => unit =
33
"";
44

5+
type task('data) = 'data => Js.Promise.t(unit);
6+
7+
[@bs.module "react-native"] [@bs.scope "AppRegistry"]
8+
external registerHeadlessTask: (string, unit => task('data)) => unit = "";
9+
510
// react-native-web
611
type app = {
712
.

0 commit comments

Comments
 (0)