import { ObservableInputTuple, OperatorFunction, SchedulerLike } from '../types'; import { operate } from '../util/lift'; import { concatAll } from './concatAll'; import { internalFromArray } from '../observable/fromArray'; import { popScheduler } from '../util/args'; /** @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()(internalFromArray([source, ...args], scheduler)).subscribe(subscriber as any); }); }