Skip to content

Commit 259d995

Browse files
committed
Switched to record instead of Js.t for results
1 parent 277dec8 commit 259d995

File tree

1 file changed

+25
-28
lines changed

1 file changed

+25
-28
lines changed

src/ReactNativePushNotificationIOS.re

Lines changed: 25 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,14 @@ external removeAllDeliveredNotifications: unit => unit =
9494
"removeAllDeliveredNotifications";
9595

9696
type deliveredNotification = {
97-
.
98-
"identifier": string,
99-
"date": Js.Nullable.t(string),
100-
"title": Js.Nullable.t(string),
101-
"body": Js.Nullable.t(string),
102-
"category": Js.Nullable.t(string),
103-
"thread-id": Js.Nullable.t(string),
104-
"userInfo": Js.Nullable.t(Js.Json.t),
97+
identifier: string,
98+
date: option(string),
99+
title: option(string),
100+
body: option(string),
101+
category: option(string),
102+
[@bs.as "thread-id"]
103+
threadId: option(string),
104+
userInfo: option(Js.Json.t),
105105
};
106106

107107
[@bs.module "@react-native-community/push-notification-ios"]
@@ -137,16 +137,15 @@ external cancelLocalNotificationsWithUserInfo: Js.Json.t => unit =
137137
"cancelLocalNotifications";
138138

139139
type formattedLocalNotification = {
140-
.
141-
"fireDate": Js.Nullable.t(string),
142-
"alertAction": Js.Nullable.t(string),
143-
"alertTitle": Js.Nullable.t(string),
144-
"alertBody": Js.Nullable.t(string),
145-
"applicationIconBadgeNumber": Js.Nullable.t(int),
146-
"category": Js.Nullable.t(string),
147-
"repeatInterval": Js.Nullable.t(string),
148-
"soundName": Js.Nullable.t(string),
149-
"userInfo": Js.Nullable.t(Js.Json.t),
140+
fireDate: option(string),
141+
alertAction: option(string),
142+
alertTitle: option(string),
143+
alertBody: option(string),
144+
applicationIconBadgeNumber: option(int),
145+
category: option(string),
146+
repeatInterval: option(string),
147+
soundName: option(string),
148+
userInfo: option(Js.Json.t),
150149
};
151150

152151
[@bs.module "@react-native-community/push-notification-ios"]
@@ -156,10 +155,9 @@ external getScheduledLocalNotifications:
156155
"getScheduledLocalNotifications";
157156

158157
type registrationError('a) = {
159-
.
160-
"message": string,
161-
"code": int,
162-
"details": Js.t('a),
158+
message: string,
159+
code: int,
160+
details: Js.t('a),
163161
};
164162

165163
[@bs.module "@react-native-community/push-notification-ios"]
@@ -193,12 +191,11 @@ external removeEventListener:
193191
"removeEventListener";
194192

195193
type permissions = {
196-
.
197-
"alert": bool,
198-
"badge": bool,
199-
"sound": bool,
200-
"lockScreen": bool,
201-
"notificationCenter": bool,
194+
alert: bool,
195+
badge: bool,
196+
sound: bool,
197+
lockScreen: bool,
198+
notificationCenter: bool,
202199
};
203200

204201
type requestPermissionsOptions;

0 commit comments

Comments
 (0)