forked from tadasr/react-native-iot-wifi
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.d.ts
25 lines (21 loc) · 880 Bytes
/
index.d.ts
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
declare module "@josectobar/react-native-iot-wifi" {
// tslint:disable:no-namespace
type ConnectArgs =
| [string, (error: string) => void]
| [string, boolean, (error: string) => void];
type RemoveConnectArgs =
| [string, (error: string) => void]
| [string, boolean, (error: string) => void];
type ConnectSecureArgs =
| [string, (error: string) => void]
| [string, string, boolean, (error: string) => void];
export namespace RNWifi {
function isApiAvailable(cb: (available: boolean) => void): void;
function getSSID(cb: (ssid: string) => void): void;
function connect(...args: ConnectArgs): void;
function connectSecure(...args: ConnectSecureArgs): void;
function removeSSID(...args: RemoveConnectArgs): void;
function forceWifiUsage(useWifi: boolean): void; //Only available for Android
}
export default RNWifi;
}