Skip to content

Commit

Permalink
fix: Use enum types instead of const in the TypeScript declaration file
Browse files Browse the repository at this point in the history
  • Loading branch information
bitcrumb committed Jan 10, 2022
1 parent 0be4965 commit 5e6dfeb
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ declare module 'react-native-wifi-reborn' {
*/
export function connectionStatus(): Promise<boolean>;

export const DISCONNECT_ERRORS = {
export enum DISCONNECT_ERRORS {
/**
* Could not get the WifiManager.
* https://developer.android.com/reference/android/net/wifi/WifiManager?hl=en
Expand All @@ -201,7 +201,7 @@ declare module 'react-native-wifi-reborn' {
* https://developer.android.com/reference/android/net/ConnectivityManager?hl=en
*/
couldNotGetConnectivityManager = 'couldNotGetConnectivityManager',
};
}

export function disconnect(): Promise<boolean>;

Expand All @@ -225,14 +225,14 @@ declare module 'react-native-wifi-reborn' {
*/
export function getIP(): Promise<string>;

export const IS_REMOVE_WIFI_NETWORK_ERRORS = {
export enum IS_REMOVE_WIFI_NETWORK_ERRORS {
/**
* Starting android 6, location permission needs to be granted for wifi scanning.
*/
locationPermissionMissing = 'locationPermissionMissing',
couldNotGetWifiManager = 'couldNotGetWifiManager',
couldNotGetConnectivityManager = 'couldNotGetConnectivityManager',
};
}

/**
* This method will remove the wifi network configuration.
Expand Down

0 comments on commit 5e6dfeb

Please sign in to comment.