3c416243b2987ab89ed7f2412ec0d9b18f8be65284a81421d24151a9284dda928a8f93342202960a2da1528ad57594affed7eaf7d277aeea57697e8652325e 1.5 KB

1234567891011121314151617181920212223242526
  1. import { ObservableInputTuple, OperatorFunction, Cons } from '../types';
  2. /**
  3. * Subscribes to the source, and the observable inputs provided as arguments, and combines their values, by index, into arrays.
  4. *
  5. * What is meant by "combine by index": The first value from each will be made into a single array, then emitted,
  6. * then the second value from each will be combined into a single array and emitted, then the third value
  7. * from each will be combined into a single array and emitted, and so on.
  8. *
  9. * This will continue until it is no longer able to combine values of the same index into an array.
  10. *
  11. * After the last value from any one completed source is emitted in an array, the resulting observable will complete,
  12. * as there is no way to continue "zipping" values together by index.
  13. *
  14. * Use-cases for this operator are limited. There are memory concerns if one of the streams is emitting
  15. * values at a much faster rate than the others. Usage should likely be limited to streams that emit
  16. * at a similar pace, or finite streams of known length.
  17. *
  18. * In many cases, authors want `combineLatestWith` and not `zipWith`.
  19. *
  20. * @param otherInputs other observable inputs to collate values from.
  21. * @return A function that returns an Observable that emits items by index
  22. * combined from the source Observable and provided Observables, in form of an
  23. * array.
  24. */
  25. export declare function zipWith<T, A extends readonly unknown[]>(...otherInputs: [...ObservableInputTuple<A>]): OperatorFunction<T, Cons<T, A>>;
  26. //# sourceMappingURL=zipWith.d.ts.map