Skip to content

Commit

Permalink
fix(types): add optional isWifiEnabled boolean to NetInfoUnknownState…
Browse files Browse the repository at this point in the history
… + NetInfoDisconnectedState (#680)

* fix: added isWifiEnabled boolean for addeventlistener
* fix: added isWifienabled boolean in disconnectedstate as well
  • Loading branch information
tohel17 committed Nov 1, 2023
1 parent f3a0c2d commit 46c4c71
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/internal/types.ts
Expand Up @@ -48,13 +48,15 @@ interface NetInfoDisconnectedState<T extends NetInfoStateType> {
isConnected: false;
isInternetReachable: false;
details: null;
isWifiEnabled?: boolean;
}

export interface NetInfoUnknownState {
type: NetInfoStateType.unknown;
isConnected: boolean | null;
isInternetReachable: null;
details: null;
isWifiEnabled?: boolean;
}

export type NetInfoNoConnectionState = NetInfoDisconnectedState<
Expand Down

0 comments on commit 46c4c71

Please sign in to comment.