Skip to content

Commit 2320685

Browse files
committed
update getNetworkConnection return type
1 parent 98b55c8 commit 2320685

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/utilities/network-information-utils.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
import { NetworkConnection } from "../interfaces/network-connection";
12
import { NetworkInformation } from "../interfaces/network-information";
23
import { Navigator } from "../types/navigator";
34

@@ -24,9 +25,7 @@ export default function buildNetworkInformationUtils(window?: Window) {
2425
/**
2526
* Returns a `NetworkConnection` object which is an aggregate of `navigator.connection` and `navigator.onLine`
2627
*/
27-
getNetworkConnection():
28-
| (NetworkInformation & { isOnline: boolean })
29-
| undefined {
28+
getNetworkConnection(): NetworkConnection | undefined {
3029
if (navigator == null) {
3130
return undefined;
3231
}

0 commit comments

Comments
 (0)