From 5387bc985a2c8b4cad011cca56e2bb8431889cf9 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sat, 21 Apr 2018 15:30:41 +0200 Subject: [PATCH] refactor(network): fix rxjs imports --- src/@ionic-native/plugins/network/index.ts | 29 +++++++++++++--------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/@ionic-native/plugins/network/index.ts b/src/@ionic-native/plugins/network/index.ts index 3148bcd8c..ef162d10c 100644 --- a/src/@ionic-native/plugins/network/index.ts +++ b/src/@ionic-native/plugins/network/index.ts @@ -1,8 +1,13 @@ import { Injectable } from '@angular/core'; -import { Cordova, CordovaProperty, Plugin, CordovaCheck, IonicNativePlugin } from '@ionic-native/core'; +import { + Cordova, + CordovaProperty, + Plugin, + CordovaCheck, + IonicNativePlugin +} from '@ionic-native/core'; import { Observable } from 'rxjs/Observable'; -import 'rxjs/add/observable/merge'; - +import { merge } from 'rxjs/observable/merge'; declare const navigator: any; @@ -57,20 +62,17 @@ declare const navigator: any; }) @Injectable() export class Network extends IonicNativePlugin { - /** * Connection type * @return {string} */ - @CordovaProperty - type: string; + @CordovaProperty type: string; /** * Downlink Max Speed * @return {string} */ - @CordovaProperty - downlinkMax: string; + @CordovaProperty downlinkMax: string; /** * Returns an observable to watch connection changes @@ -78,7 +80,7 @@ export class Network extends IonicNativePlugin { */ @CordovaCheck() onchange(): Observable { - return Observable.merge(this.onConnect(), this.onDisconnect()); + return merge(this.onConnect(), this.onDisconnect()); } /** @@ -89,7 +91,9 @@ export class Network extends IonicNativePlugin { eventObservable: true, event: 'offline' }) - onDisconnect(): Observable { return; } + onDisconnect(): Observable { + return; + } /** * Get notified when the device goes online @@ -99,6 +103,7 @@ export class Network extends IonicNativePlugin { eventObservable: true, event: 'online' }) - onConnect(): Observable { return; } - + onConnect(): Observable { + return; + } }