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