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

Rethink skipUntil and takeUntil #42

Closed
mattpodwysocki opened this issue Sep 1, 2017 · 2 comments
Closed

Rethink skipUntil and takeUntil #42

mattpodwysocki opened this issue Sep 1, 2017 · 2 comments
Assignees
Milestone

Comments

@mattpodwysocki
Copy link
Contributor

IxJS version: 2.x

Code to reproduce:

Expected behavior:

Actual behavior:

Additional information:

Current implementations of takeUntil and skipUntil accept Promise values as parameters which is problematic given their eager nature. Instead, we should look into the following overloads which support AsyncIterator as well as () => Promise<any>.

export function skipUntil<T>(
  source: AsyncIterable<T>, 
  other: () => Promise<any>);

export function skipUntil<T>(
  source: AsyncIterable<T>,
  other: AsyncIterable<any>);

export function takeUntil<T>(
  source: AsyncIterable<T>, 
  other: () => Promise<any>);

export function takeUntil<T>(
  source: AsyncIterable<T>,
  other: AsyncIterable<any>);
@mattpodwysocki mattpodwysocki added this to the Ix 3.0 milestone Sep 1, 2017
@mattpodwysocki mattpodwysocki self-assigned this Sep 1, 2017
@OliverJAsh
Copy link

I would also suggest adding a takeUntil overload which receives a predicate function, like in RxJava

#7 (comment)
http://reactivex.io/RxJava/javadoc/rx/Observable.html#takeUntil(rx.functions.Func1)

@mattpodwysocki
Copy link
Contributor Author

Closed as per #75

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants