import { FCM } from '@ionic-native/fcm' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; export interface NotificationData { /**
     * Determines whether the notification was pressed or not
     */ wasTapped : boolean ; /**
     * Notification data hash item
     */ [ name ] : any ; } export class FCMMock extends FCM { returns { Promise < string > } getToken ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Observable < string > } onTokenRefresh ( ) { let response ; return Observable . create ( ( observer ) => { observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; param { string } topic returns { Promise < any > } subscribeToTopic ( topic ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { string } topic returns { Promise < any > } unsubscribeFromTopic ( topic ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; returns { Observable < any > } onNotification ( ) { let response ; return Observable . create ( ( observer ) => { observer . next ( response ) ; observer . complete ( ) ; } ) ; } ; }