當前位置: 首頁>>代碼示例>>TypeScript>>正文


TypeScript EmptyObservable.EmptyObservable類代碼示例

本文整理匯總了TypeScript中rxjs/observable/EmptyObservable.EmptyObservable的典型用法代碼示例。如果您正苦於以下問題:TypeScript EmptyObservable類的具體用法?TypeScript EmptyObservable怎麽用?TypeScript EmptyObservable使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了EmptyObservable類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。

示例1: instance

 public static instance(networkType: string): any {
     let instance = jasmine.createSpyObj('Network', [
         'type',
         'downlinkMax',
         'onChange',
         'onDisconnect',
         'onConnect',
     ]);
     instance.type.and.returnValue(networkType || 'wifi');
     instance.downlinkMax.and.returnValue('42');
     instance.onChange.and.returnValue(EmptyObservable.create());
     instance.onDisconnect.and.returnValue(EmptyObservable.create());
     instance.onConnect.and.returnValue(EmptyObservable.create());
     return instance;
 }
開發者ID:kimonio,項目名稱:ionic-mocks,代碼行數:15,代碼來源:network.ts

示例2: instance

    public static instance(): any {
        let instance = jasmine.createSpyObj('Keyboard', [
            'hideKeyboardAccessoryBar',
            'show',
            'close',
            'disableScroll',
            'onKeyboardShow',
            'onKeyboardHide'
        ]);

        instance.onKeyboardShow.and.returnValue(EmptyObservable.create());
        instance.onKeyboardHide.and.returnValue(EmptyObservable.create());

        return instance;
    }
開發者ID:kimonio,項目名稱:ionic-mocks,代碼行數:15,代碼來源:keyboard.ts

示例3: instance

    public static instance(): any {
        let instance = jasmine.createSpyObj('ThreeDeeTouch', [
            'isAvailable',
            'watchForTouches',
            'configureQuickActions',
            'onHomeIconPressed',
            'enableLinkPreview',
            'disableLinkPreview'
        ]);
        instance.isAvailable.and.returnValue(Promise.resolve(true));
        instance.watchForTouches.and.returnValue(ArrayObservable.of({}));
        instance.onHomeIconPressed.and.returnValue(EmptyObservable.create());

        return instance;
    }
開發者ID:kimonio,項目名稱:ionic-mocks,代碼行數:15,代碼來源:three-dee-touch.ts

示例4: instance

    public static instance(): any {
        let instance = jasmine.createSpyObj('NFC', [
            'addNdefListener',
            'addTagDiscoveredListener',
            'addMimeTypeListener',
            'addNdefFormatableListener',
            'write',
            'makeReadyOnly',
            'share',
            'unshare',
            'erase',
            'handover',
            'stopHandover',
            'showSettings',
            'enabled',
            'bytesToString',
            'stringToBytes',
            'bytesToHexString'
        ]);
        instance.addNdefListener.and.returnValue(EmptyObservable.create());
        instance.addTagDiscoveredListener.and.returnValue(EmptyObservable.create());
        instance.addMimeTypeListener.and.returnValue(EmptyObservable.create());
        instance.addNdefFormatableListener.and.returnValue(EmptyObservable.create());
        instance.write.and.returnValue(EmptyObservable.create());
        instance.makeReadyOnly.and.returnValue(EmptyObservable.create());
        instance.share.and.returnValue(EmptyObservable.create());
        instance.unshare.and.returnValue(EmptyObservable.create());
        instance.erase.and.returnValue(EmptyObservable.create());
        instance.handover.and.returnValue(EmptyObservable.create());
        instance.stopHandover.and.returnValue(EmptyObservable.create());
        instance.showSettings.and.returnValue(EmptyObservable.create());
        instance.enabled.and.returnValue(EmptyObservable.create());
        instance.bytesToString.and.returnValue('');
        instance.stringToBytes.and.returnValue([]);
        instance.bytesToHexString.and.returnValue('');

        return instance;
    }
開發者ID:kimonio,項目名稱:ionic-mocks,代碼行數:38,代碼來源:nfc.ts


注:本文中的rxjs/observable/EmptyObservable.EmptyObservable類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。