fix(plugins): fix rxjs 6 build errors

#2439
This commit is contained in:
Daniel
2018-04-05 21:44:19 +02:00
parent 48b0f16ed9
commit 3ced31ed2a
54 changed files with 580 additions and 393 deletions
+12 -10
View File
@@ -1,6 +1,11 @@
import { Injectable } from '@angular/core';
import { Cordova, CordovaFunctionOverride, IonicNativePlugin, Plugin } from '@ionic-native/core';
import { Observable } from 'rxjs/Observable';
import {
Cordova,
CordovaFunctionOverride,
IonicNativePlugin,
Plugin
} from '@ionic-native/core';
import { Observable } from 'rxjs';
declare const window: any;
@@ -84,7 +89,6 @@ declare const window: any;
})
@Injectable()
export class Geofence extends IonicNativePlugin {
TransitionType = {
ENTER: 1,
EXIT: 2,
@@ -157,13 +161,11 @@ export class Geofence extends IonicNativePlugin {
* @returns {Observable<any>}
*/
onNotificationClicked(): Observable<any> {
return new Observable<any>((observer) => {
window && window.geofence && (window.geofence.onNotificationClicked = observer.next.bind(observer));
return () => window.geofence.onNotificationClicked = () => {
};
return new Observable<any>(observer => {
window &&
window.geofence &&
(window.geofence.onNotificationClicked = observer.next.bind(observer));
return () => (window.geofence.onNotificationClicked = () => {});
});
}
}