ReactiveX / rxjs

A reactive programming library for JavaScript
https://rxjs.dev
Apache License 2.0
30.7k stars 3k forks source link

accepting promise for forkJoin()? #507

Closed kwonoj closed 8 years ago

kwonoj commented 9 years ago

RxJS4's forkJoin accepts promise as well as observables

args (Arguments | Array): An array or arguments of Observable sequences or Promises to collect the last elements for.

while current implementation does not. Is this intended design to drop promise? If promise can be accepted, PR https://github.com/ReactiveX/RxJS/pull/506 might need to be updated to include it as well as updating implementation.

benlesh commented 9 years ago

Debatable. As long as it doesn't affect performance, I'm okay with it.

benlesh commented 8 years ago

forkJoin should also accept "lowercase-o" observables... Meaning any object with an [Symbol.observable] method on it that returns an object with a subscribe function that accepts an observer.

kwonoj commented 8 years ago

I'll try to add to accept promise as start with performance benchmarking.

benlesh commented 8 years ago

@kwonoj I don't recall.. did this get done?

kwonoj commented 8 years ago

It's WIP in my stash, but haven't completed yet while creating other PRs. I'll complete and create PR.

benlesh commented 8 years ago

No hurry. Just checking