forked from rescript-react-native/rescript-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathasyncStorage.rei
More file actions
55 lines (44 loc) · 1.31 KB
/
asyncStorage.rei
File metadata and controls
55 lines (44 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
type error;
let getItem:
(string, ~callback: (option(error), option(string)) => unit=?, unit) =>
Js.Promise.t(option(string));
let setItem:
(string, string, ~callback: option(error) => unit=?, unit) =>
Js.Promise.t(unit);
let removeItem:
(string, ~callback: option(error) => unit=?, unit) => Js.Promise.t(unit);
let mergeItem:
(string, string, ~callback: option(error) => unit=?, unit) =>
Js.Promise.t(unit);
let clear: (~callback: option(error) => unit=?, unit) => Js.Promise.t(unit);
let getAllKeys:
(~callback: (option(error), option(array(string))) => unit=?, unit) =>
Js.Promise.t(option(array(string)));
[@bs.scope "default"] [@bs.module "@react-native-community/async-storage"]
external flushGetRequests: unit => unit = "";
let multiGet:
(
array(string),
~callback: (option(array(error)), option(array(array(string)))) =>
unit
=?,
unit
) =>
Js.Promise.t(option(array(array(string))));
let multiSet:
(
array((string, string)),
~callback: option(array(error)) => unit=?,
unit
) =>
Js.Promise.t(unit);
let multiRemove:
(array(string), ~callback: option(array(error)) => unit=?, unit) =>
Js.Promise.t(unit);
let multiMerge:
(
array((string, string)),
~callback: option(array(error)) => unit=?,
unit
) =>
Js.Promise.t(unit);