Skip to content

Instantly share code, notes, and snippets.

@ssougnez

ssougnez/wamr-102.ts

Last active Mar 14, 2021
Embed
What would you like to do?
import { Observable } from 'rxjs';
import { retryWhen, take } from 'rxjs/operators';
observable
.pipe(
retryWhen(errors => errors.pipe(take(2)))
)
.subscribe({
next: x => console.log(`${x} received`),
complete: () => console.log('Completed'),
error: err => console.warn(err)
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment