本文整理匯總了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;
}