Rocky_Mountain_Vending/.pnpm-store/v10/files/4a/56902739abcd9bd3c3d72a6d3ee6e9393091daba258231557ada40c5314e8a0aac42ab78b102e5af0e13a8dbf94ff330b080630b96dd0c3971b9d0732e3b3e
DMleadgen 46d973904b
Initial commit: Rocky Mountain Vending website
Next.js website for Rocky Mountain Vending company featuring:
- Product catalog with Stripe integration
- Service areas and parts pages
- Admin dashboard with Clerk authentication
- SEO optimized pages with JSON-LD structured data

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 16:22:15 -07:00

48 lines
1.4 KiB
Text

import { ObservableInputTuple, OperatorFunction } from '../types';
import { concat } from './concat';
/**
* Emits all of the values from the source observable, then, once it completes, subscribes
* to each observable source provided, one at a time, emitting all of their values, and not subscribing
* to the next one until it completes.
*
* `concat(a$, b$, c$)` is the same as `a$.pipe(concatWith(b$, c$))`.
*
* ## Example
*
* Listen for one mouse click, then listen for all mouse moves.
*
* ```ts
* import { fromEvent, map, take, concatWith } from 'rxjs';
*
* const clicks$ = fromEvent(document, 'click');
* const moves$ = fromEvent(document, 'mousemove');
*
* clicks$.pipe(
* map(() => 'click'),
* take(1),
* concatWith(
* moves$.pipe(
* map(() => 'move')
* )
* )
* )
* .subscribe(x => console.log(x));
*
* // 'click'
* // 'move'
* // 'move'
* // 'move'
* // ...
* ```
*
* @param otherSources Other observable sources to subscribe to, in sequence, after the original source is complete.
* @return A function that returns an Observable that concatenates
* subscriptions to the source and provided Observables subscribing to the next
* only once the current subscription completes.
*/
export function concatWith<T, A extends readonly unknown[]>(
...otherSources: [...ObservableInputTuple<A>]
): OperatorFunction<T, T | A[number]> {
return concat(...otherSources);
}