本文整理汇总了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;
}
示例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;
}
示例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;
}
示例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;
}