import { Toast } from '@ionic-native/toast' ; import { Observable } from 'rxjs/Observable' ; import { Observer } from 'rxjs/Observer' ; export interface ToastOptions { /**
     * Message to display
     */ message ? : string ; /**
     * Duration in ms to show
     */ duration ? : number ; /**
     * Position
     */ position ? : string ; /**
     * Add negative value to move it up a bit
     */ addPixelsY ? : number ; /**
     * Pass JSON object to be sent back in success callback
     */ data ? : any ; /**
     * Styling
     */ styling ? : { opacity ? : number ; backgroundColor ? : string ; textColor ? : string ; cornerRadius ? : number ; horizontalPadding ? : number ; verticalPadding ? : number ; } ; } export class ToastMock extends Toast { param { string } message param { string } duration param { string } position returns { Observable < any > } show ( message , duration , position ) { return Observable . create ( ( observer ) => { observer . next ( '' ) ; observer . complete ( ) ; } ) ; } ; returns { Promise < any > } hide ( ) { return new Promise ( ( resolve , reject ) => { resolve ( ) ; } ) ; } ; param { Object } options returns { Observable < any > } showWithOptions ( options ) { return Observable . create ( ( observer ) => { observer . next ( '' ) ; observer . complete ( ) ; } ) ; } ; param message { string } returns { Observable < any > } showShortTop ( message ) { return Observable . create ( ( observer ) => { observer . next ( '' ) ; observer . complete ( ) ; } ) ; } ; param message { string } returns { Observable < any > } showShortCenter ( message ) { return Observable . create ( ( observer ) => { observer . next ( '' ) ; observer . complete ( ) ; } ) ; } ; param message { string } returns { Observable < any > } showShortBottom ( message ) { return Observable . create ( ( observer ) => { observer . next ( '' ) ; observer . complete ( ) ; } ) ; } ; param message { string } returns { Observable < any > } showLongTop ( message ) { return Observable . create ( ( observer ) => { observer . next ( '' ) ; observer . complete ( ) ; } ) ; } ; param message { string } returns { Observable < any > } showLongCenter ( message ) { return Observable . create ( ( observer ) => { observer . next ( '' ) ; observer . complete ( ) ; } ) ; } ; param message { string } returns { Observable < any > } showLongBottom ( message ) { return Observable . create ( ( observer ) => { observer . next ( '' ) ; observer . complete ( ) ; } ) ; } ; }