import { ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; import { operate } from '../util/lift'; import { concatAll } from './concatAll'; import { popScheduler } from '../util/args'; import { from } from '../observable/from'; /** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ export function concat(...sources: [...ObservableInputTuple]): OperatorFunction; /** @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ export function concat( ...sourcesAndScheduler: [...ObservableInputTuple, SchedulerLike] ): OperatorFunction; /** * @deprecated Replaced with {@link concatWith}. Will be removed in v8. */ export function concat(...args: any[]): OperatorFunction { const scheduler = popScheduler(args); return operate((source, subscriber) => { concatAll()(from([source, ...args], scheduler)).subscribe(subscriber); }); }