Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(repeat): now has configurable delay #6640

Merged
merged 2 commits into from
Dec 27, 2021

Conversation

benlesh
Copy link
Member

@benlesh benlesh commented Oct 14, 2021

Adds a feature to repeat to match the configurable API of retry.
repeat can now be used in a similar manner to repeatWhen, only
perhaps in a more developer-friendly way.

  • Also updates repeat tests to use run mode.

Adds a feature to `repeat` to match the configurable API of `retry`.
`repeat` can now be used in a similar manner to `repeatWhen`, only
perhaps in a more developer-friendly way.

- Also updates `repeat` tests to use run mode.
@benlesh benlesh added 7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x labels Oct 14, 2021
@benlesh
Copy link
Member Author

benlesh commented Oct 14, 2021

related #6367

@benlesh benlesh mentioned this pull request Oct 14, 2021
40 tasks
@benlesh benlesh requested a review from cartant October 14, 2021 14:38
Copy link
Collaborator

@cartant cartant left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add a test that shows that empty notifiers are not treated as signals?

src/internal/operators/repeat.ts Show resolved Hide resolved
@demensky
Copy link
Contributor

Doesn't this create unnecessary verbosity?

repeatWhen(pipe(delay(1000))) won't do the same?

Let's better update the repeatWhen examples?

timer(2000)
  .pipe(
    tap({
      subscribe: () => console.log('subscribe'),
      complete: () => console.log('complete'),
    }),
    repeatWhen(pipe(delay(1000)))
  )
  .subscribe(() => console.log('next'));

StackBlitz

const expected = '|';
rxTest.run(({ cold, expectObservable, expectSubscriptions }) => {
const e1 = cold('--a--b--| ');
const unsub = ' !';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not properly converted - though, unsub is not really needed.

@benlesh benlesh merged commit 6b7a534 into ReactiveX:master Dec 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
7.x Issues and PRs for version 7.x 8.x Issues and PRs for version 8.x
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants