本文整理匯總了TypeScript中rxjs.onErrorResumeNext函數的典型用法代碼示例。如果您正苦於以下問題:TypeScript onErrorResumeNext函數的具體用法?TypeScript onErrorResumeNext怎麽用?TypeScript onErrorResumeNext使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了onErrorResumeNext函數的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的TypeScript代碼示例。
示例1: it
it('should complete single observable throws', () => {
const source = hot('#');
const subs = '(^!)';
const expected = '|';
expectObservable(onErrorResumeNext(source)).toBe(expected);
expectSubscriptions(source.subscriptions).toBe(subs);
});
示例2: showConfirmMessageWithTitle
public showConfirmMessageWithTitle() {
let result = this.dialogService.confirm('Would you like a mug of coffee?', 'No', 'Yes', 'Excuse me');
// if you need both answers
result.subscribe( () => {
console.log('confirmed');
},
(err: any) => {
console.log('declined');
}
);
// if you only need the confirm answer
onErrorResumeNext(result).subscribe( () => {
console.log('confirmed 2');
});
}