1+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
2+ external getItem : string => Js . Promise . t (Js . Null . t (string )) = "getItem" ;
3+
4+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
5+ external setItem : (string , string ) => Js . Promise . t (unit ) = "setItem" ;
6+
7+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
8+ external removeItem : string => Js . Promise . t (unit ) = "removeItem" ;
9+
10+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
11+ external mergeItem : (string , string ) => Js . Promise . t (unit ) = "mergeItem" ;
12+
13+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
14+ external clear : unit => Js . Promise . t (unit ) = "clear" ;
15+
16+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
17+ external getAllKeys : unit => Js . Promise . t (Js . Null . t (array (string ))) =
18+ "getAllKeys" ;
19+
20+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
21+ external multiGet :
22+ array (string ) => Js . Promise . t (array ((string , Js . Null . t (string )))) =
23+ "multiGet" ;
24+
25+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
26+ external multiSet : array ((string , string )) => Js . Promise . t (unit ) =
27+ "multiSet" ;
28+
29+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
30+ external multiMerge : array ((string , string )) => Js . Promise . t (unit ) =
31+ "multiMerge" ;
32+
33+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
34+ external multiRemove : array (string ) => Js . Promise . t (unit ) = "multiRemove" ;
35+
36+ [@ bs . scope "default" ] [@ bs . module "@react-native-community/async-storage" ]
37+ external flushGetRequests : unit => unit = "flushGetRequests" ;
38+
39+ type asyncStorageState = {
40+ .
41+ [@bs.meth] "getItem": unit => Js . Promise . t (Js . Null . t (string )),
42+ [@bs.meth] "setItem": string => Js . Promise . t (unit ),
43+ [@bs.meth] "mergeItem": string => Js . Promise . t (unit ),
44+ [@bs.meth] "removeItem": unit => Js . Promise . t (unit ),
45+ };
46+
47+ [@ bs . module "@react-native-community/async-storage" ]
48+ external useAsyncStorage : string => asyncStorageState = "useAsyncStorage" ;
0 commit comments