Skip to content

Commit f558e91

Browse files
committed
Update interface file (Geolocation)
1 parent 3a541a8 commit f558e91

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

src/geolocation.rei

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,51 @@
11
type watchId = int;
22

3+
type position = {
4+
.
5+
"coords": coords,
6+
"timestamp": float,
7+
}
8+
and coords = {
9+
.
10+
"accuracy": int,
11+
"heading": int,
12+
"latitude": float,
13+
"longitude": float,
14+
"speed": int,
15+
};
16+
17+
type error = {
18+
.
19+
"code": int,
20+
"message": string,
21+
};
22+
323
let setRNConfiguration: (~skipPermissionRequests: Js.boolean=?, unit) => unit;
424

525
let requestAuthorization: unit => unit;
626

727
let stopObserving: unit => unit;
828

9-
let clearWatch: watchId => unit;
10-
1129
let getCurrentPosition:
1230
(
13-
~success: unit => unit,
14-
~error: unit => unit,
1531
~timeout: int=?,
1632
~maximumAge: int=?,
1733
~enableHighAccuracy: Js.boolean=?,
18-
unit
34+
position => unit,
35+
error => unit
1936
) =>
2037
unit;
2138

2239
let watchPosition:
2340
(
24-
~success: unit => unit,
25-
~error: unit => unit,
2641
~timeout: int=?,
2742
~maximumAge: int=?,
2843
~enableHighAccuracy: Js.boolean=?,
2944
~distanceFilter: int=?,
3045
~useSignificantChanges: Js.boolean=?,
31-
unit
46+
position => unit,
47+
error => unit
3248
) =>
3349
watchId;
50+
51+
let clearWatch: watchId => unit;

0 commit comments

Comments
 (0)