From 207976f2c81c17954b4ace5c0a9d0bafbcabc6e4 Mon Sep 17 00:00:00 2001 From: Ben Lesh Date: Thu, 30 Nov 2017 20:50:39 -0800 Subject: [PATCH] feat(reorganize): move operator impls under internal directory - moves operators directory under `internal`. - moves `operators.ts` to `internal/operators/index.ts` --- spec/Observable-spec.ts | 2 +- spec/operators/groupBy-spec.ts | 2 +- src/Observable.ts | 2 +- src/ReplaySubject.ts | 2 +- src/Rx.ts | 6 +- src/index.ts | 192 +++++++++--------- .../observable/ConnectableObservable.ts | 2 +- src/internal/observable/FromObservable.ts | 2 +- src/internal/observable/concat.ts | 2 +- src/internal/observable/dom/AjaxObservable.ts | 2 +- src/internal/observable/merge.ts | 2 +- src/{ => internal}/operators/audit.ts | 18 +- src/{ => internal}/operators/auditTime.ts | 8 +- src/{ => internal}/operators/buffer.ts | 14 +- src/{ => internal}/operators/bufferCount.ts | 10 +- src/{ => internal}/operators/bufferTime.ts | 18 +- src/{ => internal}/operators/bufferToggle.ts | 16 +- src/{ => internal}/operators/bufferWhen.ts | 20 +- src/{ => internal}/operators/catchError.ts | 12 +- src/{ => internal}/operators/combineAll.ts | 6 +- src/{ => internal}/operators/concatAll.ts | 2 +- src/{ => internal}/operators/concatMap.ts | 4 +- src/{ => internal}/operators/concatMapTo.ts | 4 +- src/{ => internal}/operators/count.ts | 10 +- src/{ => internal}/operators/debounce.ts | 16 +- src/{ => internal}/operators/debounceTime.ts | 14 +- .../operators/defaultIfEmpty.ts | 10 +- src/{ => internal}/operators/delay.ts | 22 +- src/{ => internal}/operators/delayWhen.ts | 16 +- src/{ => internal}/operators/dematerialize.ts | 10 +- src/{ => internal}/operators/distinct.ts | 16 +- .../operators/distinctUntilChanged.ts | 14 +- .../operators/distinctUntilKeyChanged.ts | 2 +- src/{ => internal}/operators/elementAt.ts | 12 +- src/{ => internal}/operators/every.ts | 10 +- src/{ => internal}/operators/exhaust.ts | 14 +- src/{ => internal}/operators/exhaustMap.ts | 16 +- src/{ => internal}/operators/expand.ts | 22 +- src/{ => internal}/operators/filter.ts | 12 +- src/{ => internal}/operators/finalize.ts | 10 +- src/{ => internal}/operators/find.ts | 8 +- src/{ => internal}/operators/findIndex.ts | 6 +- src/{ => internal}/operators/first.ts | 10 +- src/{ => internal}/operators/groupBy.ts | 12 +- .../operators/ignoreElements.ts | 8 +- src/internal/operators/index.ts | 104 ++++++++++ src/{ => internal}/operators/isEmpty.ts | 8 +- src/{ => internal}/operators/last.ts | 10 +- src/{ => internal}/operators/map.ts | 8 +- src/{ => internal}/operators/mapTo.ts | 10 +- src/{ => internal}/operators/materialize.ts | 10 +- src/{ => internal}/operators/max.ts | 2 +- src/{ => internal}/operators/mergeAll.ts | 8 +- src/{ => internal}/operators/mergeMap.ts | 16 +- src/{ => internal}/operators/mergeMapTo.ts | 18 +- src/{ => internal}/operators/mergeScan.ts | 20 +- src/{ => internal}/operators/min.ts | 2 +- src/{ => internal}/operators/multicast.ts | 12 +- src/{ => internal}/operators/observeOn.ts | 18 +- .../operators/onErrorResumeNext.ts | 18 +- src/{ => internal}/operators/pairwise.ts | 8 +- src/{ => internal}/operators/partition.ts | 6 +- src/{ => internal}/operators/pluck.ts | 4 +- src/{ => internal}/operators/publish.ts | 8 +- .../operators/publishBehavior.ts | 8 +- src/internal/operators/publishLast.ts | 9 + src/{ => internal}/operators/publishReplay.ts | 10 +- src/{ => internal}/operators/race.ts | 8 +- src/{ => internal}/operators/reduce.ts | 6 +- src/{ => internal}/operators/refCount.ts | 12 +- src/{ => internal}/operators/repeat.ts | 12 +- src/{ => internal}/operators/repeatWhen.ts | 26 +-- src/{ => internal}/operators/retry.ts | 10 +- src/{ => internal}/operators/retryWhen.ts | 26 +-- src/{ => internal}/operators/sample.ts | 16 +- src/{ => internal}/operators/sampleTime.ts | 16 +- src/{ => internal}/operators/scan.ts | 8 +- src/{ => internal}/operators/sequenceEqual.ts | 14 +- src/{ => internal}/operators/share.ts | 6 +- src/{ => internal}/operators/shareReplay.ts | 12 +- src/{ => internal}/operators/single.ts | 14 +- src/{ => internal}/operators/skip.ts | 10 +- src/{ => internal}/operators/skipLast.ts | 14 +- src/{ => internal}/operators/skipUntil.ts | 16 +- src/{ => internal}/operators/skipWhile.ts | 10 +- src/{ => internal}/operators/startWith.ts | 16 +- src/{ => internal}/operators/subscribeOn.ts | 14 +- src/internal/operators/switchAll.ts | 8 + src/{ => internal}/operators/switchMap.ts | 16 +- src/{ => internal}/operators/switchMapTo.ts | 16 +- src/{ => internal}/operators/take.ts | 14 +- src/{ => internal}/operators/takeLast.ts | 14 +- src/{ => internal}/operators/takeUntil.ts | 16 +- src/{ => internal}/operators/takeWhile.ts | 10 +- src/{ => internal}/operators/tap.ts | 16 +- src/{ => internal}/operators/throttle.ts | 16 +- src/{ => internal}/operators/throttleTime.ts | 14 +- src/{ => internal}/operators/timeInterval.ts | 12 +- src/{ => internal}/operators/timeout.ts | 20 +- src/{ => internal}/operators/timeoutWith.ts | 22 +- src/{ => internal}/operators/timestamp.ts | 6 +- src/{ => internal}/operators/toArray.ts | 2 +- src/{ => internal}/operators/window.ts | 16 +- src/{ => internal}/operators/windowCount.ts | 10 +- src/{ => internal}/operators/windowTime.ts | 22 +- src/{ => internal}/operators/windowToggle.ts | 22 +- src/{ => internal}/operators/windowWhen.ts | 22 +- .../operators/withLatestFrom.ts | 14 +- src/{ => internal}/operators/zipAll.ts | 6 +- src/internal/patching/operator/audit.ts | 2 +- src/internal/patching/operator/auditTime.ts | 2 +- src/internal/patching/operator/buffer.ts | 2 +- src/internal/patching/operator/bufferCount.ts | 2 +- src/internal/patching/operator/bufferTime.ts | 2 +- .../patching/operator/bufferToggle.ts | 2 +- src/internal/patching/operator/bufferWhen.ts | 2 +- src/internal/patching/operator/catch.ts | 2 +- src/internal/patching/operator/combineAll.ts | 2 +- src/internal/patching/operator/concatAll.ts | 2 +- src/internal/patching/operator/concatMap.ts | 2 +- src/internal/patching/operator/concatMapTo.ts | 2 +- src/internal/patching/operator/count.ts | 2 +- src/internal/patching/operator/debounce.ts | 2 +- .../patching/operator/debounceTime.ts | 2 +- .../patching/operator/defaultIfEmpty.ts | 2 +- src/internal/patching/operator/delay.ts | 2 +- src/internal/patching/operator/delayWhen.ts | 2 +- .../patching/operator/dematerialize.ts | 2 +- src/internal/patching/operator/distinct.ts | 2 +- .../patching/operator/distinctUntilChanged.ts | 2 +- .../operator/distinctUntilKeyChanged.ts | 2 +- src/internal/patching/operator/do.ts | 2 +- src/internal/patching/operator/elementAt.ts | 2 +- src/internal/patching/operator/every.ts | 2 +- src/internal/patching/operator/exhaust.ts | 2 +- src/internal/patching/operator/exhaustMap.ts | 2 +- src/internal/patching/operator/expand.ts | 2 +- src/internal/patching/operator/filter.ts | 2 +- src/internal/patching/operator/finally.ts | 2 +- src/internal/patching/operator/find.ts | 2 +- src/internal/patching/operator/findIndex.ts | 2 +- src/internal/patching/operator/first.ts | 2 +- src/internal/patching/operator/groupBy.ts | 2 +- .../patching/operator/ignoreElements.ts | 2 +- src/internal/patching/operator/isEmpty.ts | 2 +- src/internal/patching/operator/last.ts | 2 +- src/internal/patching/operator/map.ts | 2 +- src/internal/patching/operator/mapTo.ts | 2 +- src/internal/patching/operator/materialize.ts | 2 +- src/internal/patching/operator/max.ts | 2 +- src/internal/patching/operator/mergeAll.ts | 2 +- src/internal/patching/operator/mergeMap.ts | 2 +- src/internal/patching/operator/mergeMapTo.ts | 2 +- src/internal/patching/operator/mergeScan.ts | 2 +- src/internal/patching/operator/min.ts | 2 +- src/internal/patching/operator/multicast.ts | 2 +- src/internal/patching/operator/observeOn.ts | 2 +- .../patching/operator/onErrorResumeNext.ts | 2 +- src/internal/patching/operator/pairwise.ts | 2 +- src/internal/patching/operator/partition.ts | 2 +- src/internal/patching/operator/pluck.ts | 2 +- src/internal/patching/operator/publish.ts | 2 +- .../patching/operator/publishBehavior.ts | 2 +- src/internal/patching/operator/publishLast.ts | 2 +- .../patching/operator/publishReplay.ts | 2 +- src/internal/patching/operator/race.ts | 2 +- src/internal/patching/operator/reduce.ts | 2 +- src/internal/patching/operator/repeat.ts | 2 +- src/internal/patching/operator/repeatWhen.ts | 2 +- src/internal/patching/operator/retry.ts | 2 +- src/internal/patching/operator/retryWhen.ts | 2 +- src/internal/patching/operator/sample.ts | 2 +- src/internal/patching/operator/sampleTime.ts | 2 +- src/internal/patching/operator/scan.ts | 2 +- .../patching/operator/sequenceEqual.ts | 2 +- src/internal/patching/operator/share.ts | 2 +- src/internal/patching/operator/shareReplay.ts | 2 +- src/internal/patching/operator/single.ts | 2 +- src/internal/patching/operator/skip.ts | 2 +- src/internal/patching/operator/skipLast.ts | 2 +- src/internal/patching/operator/skipUntil.ts | 2 +- src/internal/patching/operator/skipWhile.ts | 2 +- src/internal/patching/operator/startWith.ts | 2 +- src/internal/patching/operator/subscribeOn.ts | 2 +- src/internal/patching/operator/switch.ts | 2 +- src/internal/patching/operator/switchMap.ts | 2 +- src/internal/patching/operator/switchMapTo.ts | 2 +- src/internal/patching/operator/take.ts | 2 +- src/internal/patching/operator/takeLast.ts | 2 +- src/internal/patching/operator/takeUntil.ts | 2 +- src/internal/patching/operator/takeWhile.ts | 2 +- src/internal/patching/operator/throttle.ts | 2 +- .../patching/operator/throttleTime.ts | 4 +- .../patching/operator/timeInterval.ts | 2 +- src/internal/patching/operator/timeout.ts | 2 +- src/internal/patching/operator/timeoutWith.ts | 2 +- src/internal/patching/operator/timestamp.ts | 4 +- src/internal/patching/operator/toArray.ts | 2 +- src/internal/patching/operator/window.ts | 2 +- src/internal/patching/operator/windowCount.ts | 2 +- src/internal/patching/operator/windowTime.ts | 2 +- .../patching/operator/windowToggle.ts | 2 +- src/internal/patching/operator/windowWhen.ts | 2 +- .../patching/operator/withLatestFrom.ts | 2 +- src/internal/patching/operator/zipAll.ts | 2 +- src/observable/combineLatest.ts | 161 +++++++++++++++ src/operators.ts | 104 ---------- src/operators/publishLast.ts | 9 - src/operators/switchAll.ts | 8 - 209 files changed, 1077 insertions(+), 916 deletions(-) rename src/{ => internal}/operators/audit.ts (88%) rename src/{ => internal}/operators/auditTime.ts (91%) rename src/{ => internal}/operators/buffer.ts (86%) rename src/{ => internal}/operators/bufferCount.ts (94%) rename src/{ => internal}/operators/bufferTime.ts (94%) rename src/{ => internal}/operators/bufferToggle.ts (92%) rename src/{ => internal}/operators/bufferWhen.ts (87%) rename src/{ => internal}/operators/catchError.ts (91%) rename src/{ => internal}/operators/combineAll.ts (50%) rename src/{ => internal}/operators/concatAll.ts (97%) rename src/{ => internal}/operators/concatMap.ts (97%) rename src/{ => internal}/operators/concatMapTo.ts (96%) rename src/{ => internal}/operators/count.ts (93%) rename src/{ => internal}/operators/debounce.ts (90%) rename src/{ => internal}/operators/debounceTime.ts (92%) rename src/{ => internal}/operators/defaultIfEmpty.ts (91%) rename src/{ => internal}/operators/delay.ts (89%) rename src/{ => internal}/operators/delayWhen.ts (93%) rename src/{ => internal}/operators/dematerialize.ts (90%) rename src/{ => internal}/operators/distinct.ts (90%) rename src/{ => internal}/operators/distinctUntilChanged.ts (90%) rename src/{ => internal}/operators/distinctUntilKeyChanged.ts (97%) rename src/{ => internal}/operators/elementAt.ts (90%) rename src/{ => internal}/operators/every.ts (90%) rename src/{ => internal}/operators/exhaust.ts (87%) rename src/{ => internal}/operators/exhaustMap.ts (92%) rename src/{ => internal}/operators/expand.ts (90%) rename src/{ => internal}/operators/filter.ts (92%) rename src/{ => internal}/operators/finalize.ts (80%) rename src/{ => internal}/operators/find.ts (94%) rename src/{ => internal}/operators/findIndex.ts (91%) rename src/{ => internal}/operators/first.ts (96%) rename src/{ => internal}/operators/groupBy.ts (97%) rename src/{ => internal}/operators/ignoreElements.ts (83%) create mode 100644 src/internal/operators/index.ts rename src/{ => internal}/operators/isEmpty.ts (81%) rename src/{ => internal}/operators/last.ts (94%) rename src/{ => internal}/operators/map.ts (93%) rename src/{ => internal}/operators/mapTo.ts (89%) rename src/{ => internal}/operators/materialize.ts (92%) rename src/{ => internal}/operators/max.ts (95%) rename src/{ => internal}/operators/mergeAll.ts (93%) rename src/{ => internal}/operators/mergeMap.ts (93%) rename src/{ => internal}/operators/mergeMapTo.ts (92%) rename src/{ => internal}/operators/mergeScan.ts (87%) rename src/{ => internal}/operators/min.ts (95%) rename src/{ => internal}/operators/multicast.ts (91%) rename src/{ => internal}/operators/observeOn.ts (91%) rename src/{ => internal}/operators/onErrorResumeNext.ts (93%) rename src/{ => internal}/operators/pairwise.ts (91%) rename src/{ => internal}/operators/partition.ts (94%) rename src/{ => internal}/operators/pluck.ts (94%) rename src/{ => internal}/operators/publish.ts (87%) rename src/{ => internal}/operators/publishBehavior.ts (60%) create mode 100644 src/internal/operators/publishLast.ts rename src/{ => internal}/operators/publishReplay.ts (84%) rename src/{ => internal}/operators/race.ts (85%) rename src/{ => internal}/operators/reduce.ts (95%) rename src/{ => internal}/operators/refCount.ts (88%) rename src/{ => internal}/operators/repeat.ts (83%) rename src/{ => internal}/operators/repeatWhen.ts (85%) rename src/{ => internal}/operators/retry.ts (88%) rename src/{ => internal}/operators/retryWhen.ts (84%) rename src/{ => internal}/operators/sample.ts (85%) rename src/{ => internal}/operators/sampleTime.ts (88%) rename src/{ => internal}/operators/scan.ts (94%) rename src/{ => internal}/operators/sequenceEqual.ts (93%) rename src/{ => internal}/operators/share.ts (86%) rename src/{ => internal}/operators/shareReplay.ts (80%) rename src/{ => internal}/operators/single.ts (88%) rename src/{ => internal}/operators/skip.ts (81%) rename src/{ => internal}/operators/skipLast.ts (88%) rename src/{ => internal}/operators/skipUntil.ts (81%) rename src/{ => internal}/operators/skipWhile.ts (87%) rename src/{ => internal}/operators/startWith.ts (79%) rename src/{ => internal}/operators/subscribeOn.ts (72%) create mode 100644 src/internal/operators/switchAll.ts rename src/{ => internal}/operators/switchMap.ts (92%) rename src/{ => internal}/operators/switchMapTo.ts (92%) rename src/{ => internal}/operators/take.ts (85%) rename src/{ => internal}/operators/takeLast.ts (88%) rename src/{ => internal}/operators/takeUntil.ts (84%) rename src/{ => internal}/operators/takeWhile.ts (92%) rename src/{ => internal}/operators/tap.ts (91%) rename src/{ => internal}/operators/throttle.ts (91%) rename src/{ => internal}/operators/throttleTime.ts (91%) rename src/{ => internal}/operators/timeInterval.ts (79%) rename src/{ => internal}/operators/timeout.ts (92%) rename src/{ => internal}/operators/timeoutWith.ts (90%) rename src/{ => internal}/operators/timestamp.ts (78%) rename src/{ => internal}/operators/toArray.ts (85%) rename src/{ => internal}/operators/window.ts (89%) rename src/{ => internal}/operators/windowCount.ts (95%) rename src/{ => internal}/operators/windowTime.ts (94%) rename src/{ => internal}/operators/windowToggle.ts (91%) rename src/{ => internal}/operators/windowWhen.ts (88%) rename src/{ => internal}/operators/withLatestFrom.ts (94%) rename src/{ => internal}/operators/zipAll.ts (51%) create mode 100644 src/observable/combineLatest.ts delete mode 100644 src/operators.ts delete mode 100644 src/operators/publishLast.ts delete mode 100644 src/operators/switchAll.ts diff --git a/spec/Observable-spec.ts b/spec/Observable-spec.ts index 88f3be9cfd..ea938de121 100644 --- a/spec/Observable-spec.ts +++ b/spec/Observable-spec.ts @@ -3,7 +3,7 @@ import * as sinon from 'sinon'; import * as Rx from '../src/Rx'; import { TeardownLogic } from '../src/Subscription'; import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports -import { map } from '../src/operators/map'; +import { map } from '../src/internal/operators/map'; //tslint:disable-next-line require('./helpers/test-helper'); diff --git a/spec/operators/groupBy-spec.ts b/spec/operators/groupBy-spec.ts index 5ff73a913e..e48fe2cc1c 100644 --- a/spec/operators/groupBy-spec.ts +++ b/spec/operators/groupBy-spec.ts @@ -1,6 +1,6 @@ import { expect } from 'chai'; import * as Rx from '../../src/Rx'; -import { GroupedObservable } from '../../src/operators/groupBy'; +import { GroupedObservable } from '../../src/internal/operators/groupBy'; import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports declare const { asDiagram }; diff --git a/src/Observable.ts b/src/Observable.ts index 21ce5cb70e..082087bb3d 100644 --- a/src/Observable.ts +++ b/src/Observable.ts @@ -288,7 +288,7 @@ export class Observable implements Subscribable { * * @example * - * import { map, filter, scan } from 'rxjs/operators'; + * import { map, filter, scan } from 'rxjs/internal/operators'; * * Rx.Observable.interval(1000) * .pipe( diff --git a/src/ReplaySubject.ts b/src/ReplaySubject.ts index 862633b392..d44c8c9cd8 100644 --- a/src/ReplaySubject.ts +++ b/src/ReplaySubject.ts @@ -3,7 +3,7 @@ import { IScheduler } from './Scheduler'; import { queue } from './scheduler/queue'; import { Subscriber } from './Subscriber'; import { Subscription } from './Subscription'; -import { ObserveOnSubscriber } from './operators/observeOn'; +import { ObserveOnSubscriber } from './internal/operators/observeOn'; import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError'; import { SubjectSubscription } from './SubjectSubscription'; /** diff --git a/src/Rx.ts b/src/Rx.ts index e7babde691..53d6103a67 100644 --- a/src/Rx.ts +++ b/src/Rx.ts @@ -38,7 +38,7 @@ import './add/observable/zip'; import './add/observable/dom/ajax'; import './add/observable/dom/webSocket'; -//operators +//internal/operators import './add/operator/buffer'; import './add/operator/bufferCount'; import './add/operator/bufferTime'; @@ -158,7 +158,7 @@ export {ObjectUnsubscribedError} from './util/ObjectUnsubscribedError'; export {TimeoutError} from './util/TimeoutError'; export {UnsubscriptionError} from './util/UnsubscriptionError'; export {TimeInterval} from './internal/patching/operator/timeInterval'; -export {Timestamp} from './operators/timestamp'; +export {Timestamp} from './internal/operators/timestamp'; export {TestScheduler} from './testing/TestScheduler'; export {VirtualTimeScheduler} from './scheduler/VirtualTimeScheduler'; export {AjaxRequest, AjaxResponse, AjaxError, AjaxTimeoutError} from './internal/observable/dom/AjaxObservable'; @@ -176,7 +176,7 @@ import { rxSubscriber } from './symbol/rxSubscriber'; import { iterator } from './symbol/iterator'; import { observable } from './symbol/observable'; -import * as _operators from './operators'; +import * as _operators from './internal/operators'; export const operators = _operators; diff --git a/src/index.ts b/src/index.ts index da06946dca..9f909d0259 100644 --- a/src/index.ts +++ b/src/index.ts @@ -25,108 +25,108 @@ export { using } from './internal/observable/using'; export { zip } from './internal/observable/zip'; /* Operator exports */ -export { audit } from './operators/audit'; -export { auditTime } from './operators/auditTime'; -export { buffer } from './operators/buffer'; -export { bufferCount } from './operators/bufferCount'; -export { bufferTime } from './operators/bufferTime'; -export { bufferToggle } from './operators/bufferToggle'; -export { bufferWhen } from './operators/bufferWhen'; -export { catchError } from './operators/catchError'; -export { combineAll } from './operators/combineAll'; -export { concatAll } from './operators/concatAll'; -export { concatMap } from './operators/concatMap'; -export { concatMapTo } from './operators/concatMapTo'; -export { count } from './operators/count'; -export { debounce } from './operators/debounce'; -export { debounceTime } from './operators/debounceTime'; -export { defaultIfEmpty } from './operators/defaultIfEmpty'; -export { delay } from './operators/delay'; -export { delayWhen } from './operators/delayWhen'; -export { dematerialize } from './operators/dematerialize'; -export { distinct } from './operators/distinct'; -export { distinctUntilChanged } from './operators/distinctUntilChanged'; -export { distinctUntilKeyChanged } from './operators/distinctUntilKeyChanged'; -export { elementAt } from './operators/elementAt'; -export { every } from './operators/every'; -export { exhaust } from './operators/exhaust'; -export { exhaustMap } from './operators/exhaustMap'; -export { expand } from './operators/expand'; -export { filter } from './operators/filter'; -export { finalize } from './operators/finalize'; -export { find } from './operators/find'; -export { findIndex } from './operators/findIndex'; -export { first } from './operators/first'; -export { groupBy } from './operators/groupBy'; -export { ignoreElements } from './operators/ignoreElements'; -export { isEmpty } from './operators/isEmpty'; -export { last } from './operators/last'; -export { map } from './operators/map'; -export { mapTo } from './operators/mapTo'; -export { materialize } from './operators/materialize'; -export { max } from './operators/max'; -export { mergeAll } from './operators/mergeAll'; -export { mergeMap } from './operators/mergeMap'; -export { mergeMap as flatMap } from './operators/mergeMap'; -export { mergeMapTo } from './operators/mergeMapTo'; -export { mergeScan } from './operators/mergeScan'; -export { min } from './operators/min'; -export { multicast } from './operators/multicast'; -export { observeOn } from './operators/observeOn'; -export { pairwise } from './operators/pairwise'; -export { partition } from './operators/partition'; -export { pluck } from './operators/pluck'; -export { publish } from './operators/publish'; -export { publishBehavior } from './operators/publishBehavior'; -export { publishLast } from './operators/publishLast'; -export { publishReplay } from './operators/publishReplay'; -export { reduce } from './operators/reduce'; -export { repeat } from './operators/repeat'; -export { repeatWhen } from './operators/repeatWhen'; -export { retry } from './operators/retry'; -export { retryWhen } from './operators/retryWhen'; -export { refCount } from './operators/refCount'; -export { sample } from './operators/sample'; -export { sampleTime } from './operators/sampleTime'; -export { scan } from './operators/scan'; -export { sequenceEqual } from './operators/sequenceEqual'; -export { share } from './operators/share'; -export { shareReplay } from './operators/shareReplay'; -export { single } from './operators/single'; -export { skip } from './operators/skip'; -export { skipLast } from './operators/skipLast'; -export { skipUntil } from './operators/skipUntil'; -export { skipWhile } from './operators/skipWhile'; -export { startWith } from './operators/startWith'; +export { audit } from './internal/operators/audit'; +export { auditTime } from './internal/operators/auditTime'; +export { buffer } from './internal/operators/buffer'; +export { bufferCount } from './internal/operators/bufferCount'; +export { bufferTime } from './internal/operators/bufferTime'; +export { bufferToggle } from './internal/operators/bufferToggle'; +export { bufferWhen } from './internal/operators/bufferWhen'; +export { catchError } from './internal/operators/catchError'; +export { combineAll } from './internal/operators/combineAll'; +export { concatAll } from './internal/operators/concatAll'; +export { concatMap } from './internal/operators/concatMap'; +export { concatMapTo } from './internal/operators/concatMapTo'; +export { count } from './internal/operators/count'; +export { debounce } from './internal/operators/debounce'; +export { debounceTime } from './internal/operators/debounceTime'; +export { defaultIfEmpty } from './internal/operators/defaultIfEmpty'; +export { delay } from './internal/operators/delay'; +export { delayWhen } from './internal/operators/delayWhen'; +export { dematerialize } from './internal/operators/dematerialize'; +export { distinct } from './internal/operators/distinct'; +export { distinctUntilChanged } from './internal/operators/distinctUntilChanged'; +export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged'; +export { elementAt } from './internal/operators/elementAt'; +export { every } from './internal/operators/every'; +export { exhaust } from './internal/operators/exhaust'; +export { exhaustMap } from './internal/operators/exhaustMap'; +export { expand } from './internal/operators/expand'; +export { filter } from './internal/operators/filter'; +export { finalize } from './internal/operators/finalize'; +export { find } from './internal/operators/find'; +export { findIndex } from './internal/operators/findIndex'; +export { first } from './internal/operators/first'; +export { groupBy } from './internal/operators/groupBy'; +export { ignoreElements } from './internal/operators/ignoreElements'; +export { isEmpty } from './internal/operators/isEmpty'; +export { last } from './internal/operators/last'; +export { map } from './internal/operators/map'; +export { mapTo } from './internal/operators/mapTo'; +export { materialize } from './internal/operators/materialize'; +export { max } from './internal/operators/max'; +export { mergeAll } from './internal/operators/mergeAll'; +export { mergeMap } from './internal/operators/mergeMap'; +export { mergeMap as flatMap } from './internal/operators/mergeMap'; +export { mergeMapTo } from './internal/operators/mergeMapTo'; +export { mergeScan } from './internal/operators/mergeScan'; +export { min } from './internal/operators/min'; +export { multicast } from './internal/operators/multicast'; +export { observeOn } from './internal/operators/observeOn'; +export { pairwise } from './internal/operators/pairwise'; +export { partition } from './internal/operators/partition'; +export { pluck } from './internal/operators/pluck'; +export { publish } from './internal/operators/publish'; +export { publishBehavior } from './internal/operators/publishBehavior'; +export { publishLast } from './internal/operators/publishLast'; +export { publishReplay } from './internal/operators/publishReplay'; +export { reduce } from './internal/operators/reduce'; +export { repeat } from './internal/operators/repeat'; +export { repeatWhen } from './internal/operators/repeatWhen'; +export { retry } from './internal/operators/retry'; +export { retryWhen } from './internal/operators/retryWhen'; +export { refCount } from './internal/operators/refCount'; +export { sample } from './internal/operators/sample'; +export { sampleTime } from './internal/operators/sampleTime'; +export { scan } from './internal/operators/scan'; +export { sequenceEqual } from './internal/operators/sequenceEqual'; +export { share } from './internal/operators/share'; +export { shareReplay } from './internal/operators/shareReplay'; +export { single } from './internal/operators/single'; +export { skip } from './internal/operators/skip'; +export { skipLast } from './internal/operators/skipLast'; +export { skipUntil } from './internal/operators/skipUntil'; +export { skipWhile } from './internal/operators/skipWhile'; +export { startWith } from './internal/operators/startWith'; /** * TODO(https://github.com/ReactiveX/rxjs/issues/2900): Add back subscribeOn once it can be * treeshaken. Currently if this export is added back, it * forces apps to bring in asap scheduler along with * Immediate, root, and other supporting code. */ -// export { subscribeOn } from './operators/subscribeOn'; -export { switchAll } from './operators/switchAll'; -export { switchMap } from './operators/switchMap'; -export { switchMapTo } from './operators/switchMapTo'; -export { take } from './operators/take'; -export { takeLast } from './operators/takeLast'; -export { takeUntil } from './operators/takeUntil'; -export { takeWhile } from './operators/takeWhile'; -export { tap } from './operators/tap'; -export { throttle } from './operators/throttle'; -export { throttleTime } from './operators/throttleTime'; -export { timeInterval } from './operators/timeInterval'; -export { timeout } from './operators/timeout'; -export { timeoutWith } from './operators/timeoutWith'; -export { timestamp } from './operators/timestamp'; -export { toArray } from './operators/toArray'; -export { window } from './operators/window'; -export { windowCount } from './operators/windowCount'; -export { windowTime } from './operators/windowTime'; -export { windowToggle } from './operators/windowToggle'; -export { windowWhen } from './operators/windowWhen'; -export { withLatestFrom } from './operators/withLatestFrom'; -export { zipAll } from './operators/zipAll'; +// export { subscribeOn } from './internal/operators/subscribeOn'; +export { switchAll } from './internal/operators/switchAll'; +export { switchMap } from './internal/operators/switchMap'; +export { switchMapTo } from './internal/operators/switchMapTo'; +export { take } from './internal/operators/take'; +export { takeLast } from './internal/operators/takeLast'; +export { takeUntil } from './internal/operators/takeUntil'; +export { takeWhile } from './internal/operators/takeWhile'; +export { tap } from './internal/operators/tap'; +export { throttle } from './internal/operators/throttle'; +export { throttleTime } from './internal/operators/throttleTime'; +export { timeInterval } from './internal/operators/timeInterval'; +export { timeout } from './internal/operators/timeout'; +export { timeoutWith } from './internal/operators/timeoutWith'; +export { timestamp } from './internal/operators/timestamp'; +export { toArray } from './internal/operators/toArray'; +export { window } from './internal/operators/window'; +export { windowCount } from './internal/operators/windowCount'; +export { windowTime } from './internal/operators/windowTime'; +export { windowToggle } from './internal/operators/windowToggle'; +export { windowWhen } from './internal/operators/windowWhen'; +export { withLatestFrom } from './internal/operators/withLatestFrom'; +export { zipAll } from './internal/operators/zipAll'; /* Subjects */ export { Subject } from './Subject'; diff --git a/src/internal/observable/ConnectableObservable.ts b/src/internal/observable/ConnectableObservable.ts index 6e602124d4..19782c0a3e 100644 --- a/src/internal/observable/ConnectableObservable.ts +++ b/src/internal/observable/ConnectableObservable.ts @@ -3,7 +3,7 @@ import { Operator } from '../../Operator'; import { Observable } from '../../Observable'; import { Subscriber } from '../../Subscriber'; import { Subscription, TeardownLogic } from '../../Subscription'; -import { refCount as higherOrderRefCount } from '../../operators/refCount'; +import { refCount as higherOrderRefCount } from '../../internal/operators/refCount'; /** * @class ConnectableObservable diff --git a/src/internal/observable/FromObservable.ts b/src/internal/observable/FromObservable.ts index fd63718fe3..c70e008770 100644 --- a/src/internal/observable/FromObservable.ts +++ b/src/internal/observable/FromObservable.ts @@ -10,7 +10,7 @@ import { IScheduler } from '../../Scheduler'; import { iterator as Symbol_iterator } from '../../symbol/iterator'; import { Observable, ObservableInput } from '../../Observable'; import { Subscriber } from '../../Subscriber'; -import { ObserveOnSubscriber } from '../../operators/observeOn'; +import { ObserveOnSubscriber } from '../../internal/operators/observeOn'; import { observable as Symbol_observable } from '../../symbol/observable'; /** diff --git a/src/internal/observable/concat.ts b/src/internal/observable/concat.ts index 4a9631a069..f69f121edd 100644 --- a/src/internal/observable/concat.ts +++ b/src/internal/observable/concat.ts @@ -3,7 +3,7 @@ import { IScheduler } from '../../Scheduler'; import { isScheduler } from '../../util/isScheduler'; import { of } from './of'; import { from } from './from'; -import { concatAll } from '../../operators/concatAll'; +import { concatAll } from '../../internal/operators/concatAll'; /* tslint:disable:max-line-length */ export function concat(v1: ObservableInput, scheduler?: IScheduler): Observable; diff --git a/src/internal/observable/dom/AjaxObservable.ts b/src/internal/observable/dom/AjaxObservable.ts index a958663af0..269186cbce 100644 --- a/src/internal/observable/dom/AjaxObservable.ts +++ b/src/internal/observable/dom/AjaxObservable.ts @@ -4,7 +4,7 @@ import { errorObject } from '../../../util/errorObject'; import { Observable } from '../../../Observable'; import { Subscriber } from '../../../Subscriber'; import { TeardownLogic } from '../../../Subscription'; -import { map } from '../../../operators/map'; +import { map } from '../../../internal/operators/map'; export interface AjaxRequest { url?: string; diff --git a/src/internal/observable/merge.ts b/src/internal/observable/merge.ts index 0a7bb35614..d2f53abdc7 100644 --- a/src/internal/observable/merge.ts +++ b/src/internal/observable/merge.ts @@ -1,7 +1,7 @@ import { Observable, ObservableInput } from '../../Observable'; import { IScheduler } from '../../Scheduler'; import { isScheduler } from '../../util/isScheduler'; -import { mergeAll } from '../../operators/mergeAll'; +import { mergeAll } from '../../internal/operators/mergeAll'; import { ArrayObservable } from './ArrayObservable'; /* tslint:disable:max-line-length */ diff --git a/src/operators/audit.ts b/src/internal/operators/audit.ts similarity index 88% rename from src/operators/audit.ts rename to src/internal/operators/audit.ts index f2fd270674..6acaa03598 100644 --- a/src/operators/audit.ts +++ b/src/internal/operators/audit.ts @@ -1,13 +1,13 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable, SubscribableOrPromise } from '../Observable'; -import { Subscription, TeardownLogic } from '../Subscription'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable, SubscribableOrPromise } from '../../Observable'; +import { Subscription, TeardownLogic } from '../../Subscription'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Ignores source values for a duration determined by another Observable, then diff --git a/src/operators/auditTime.ts b/src/internal/operators/auditTime.ts similarity index 91% rename from src/operators/auditTime.ts rename to src/internal/operators/auditTime.ts index d9def99bb3..c7c6ccc670 100644 --- a/src/operators/auditTime.ts +++ b/src/internal/operators/auditTime.ts @@ -1,8 +1,8 @@ -import { async } from '../scheduler/async'; -import { IScheduler } from '../Scheduler'; +import { async } from '../../scheduler/async'; +import { IScheduler } from '../../Scheduler'; import { audit } from './audit'; -import { timer } from '../internal/observable/timer'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { timer } from '../../internal/observable/timer'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Ignores source values for `duration` milliseconds, then emits the most recent diff --git a/src/operators/buffer.ts b/src/internal/operators/buffer.ts similarity index 86% rename from src/operators/buffer.ts rename to src/internal/operators/buffer.ts index 255894d390..3d1ae622fc 100644 --- a/src/operators/buffer.ts +++ b/src/internal/operators/buffer.ts @@ -1,10 +1,10 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /** * Buffers the source Observable values until `closingNotifier` emits. diff --git a/src/operators/bufferCount.ts b/src/internal/operators/bufferCount.ts similarity index 94% rename from src/operators/bufferCount.ts rename to src/internal/operators/bufferCount.ts index 94bfb02dda..47e7d56042 100644 --- a/src/operators/bufferCount.ts +++ b/src/internal/operators/bufferCount.ts @@ -1,8 +1,8 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { OperatorFunction } from '../../interfaces'; /** * Buffers the source Observable values until the size hits the maximum diff --git a/src/operators/bufferTime.ts b/src/internal/operators/bufferTime.ts similarity index 94% rename from src/operators/bufferTime.ts rename to src/internal/operators/bufferTime.ts index 34c4c44aca..7c93f36071 100644 --- a/src/operators/bufferTime.ts +++ b/src/internal/operators/bufferTime.ts @@ -1,12 +1,12 @@ -import { IScheduler } from '../Scheduler'; -import { Action } from '../scheduler/Action'; -import { Operator } from '../Operator'; -import { async } from '../scheduler/async'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { isScheduler } from '../util/isScheduler'; -import { OperatorFunction } from '../interfaces'; +import { IScheduler } from '../../Scheduler'; +import { Action } from '../../scheduler/Action'; +import { Operator } from '../../Operator'; +import { async } from '../../scheduler/async'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Subscription } from '../../Subscription'; +import { isScheduler } from '../../util/isScheduler'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function bufferTime(bufferTimeSpan: number, scheduler?: IScheduler): OperatorFunction; diff --git a/src/operators/bufferToggle.ts b/src/internal/operators/bufferToggle.ts similarity index 92% rename from src/operators/bufferToggle.ts rename to src/internal/operators/bufferToggle.ts index 7839ced9dd..6ae1ada762 100644 --- a/src/operators/bufferToggle.ts +++ b/src/internal/operators/bufferToggle.ts @@ -1,11 +1,11 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable, SubscribableOrPromise } from '../Observable'; -import { Subscription } from '../Subscription'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable, SubscribableOrPromise } from '../../Observable'; +import { Subscription } from '../../Subscription'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { OperatorFunction } from '../../interfaces'; /** * Buffers the source Observable values starting from an emission from diff --git a/src/operators/bufferWhen.ts b/src/internal/operators/bufferWhen.ts similarity index 87% rename from src/operators/bufferWhen.ts rename to src/internal/operators/bufferWhen.ts index 9ca4a704e8..e944644dfb 100644 --- a/src/operators/bufferWhen.ts +++ b/src/internal/operators/bufferWhen.ts @@ -1,13 +1,13 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { Subscription } from '../Subscription'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subscription } from '../../Subscription'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /** * Buffers the source Observable values, using a factory function of closing diff --git a/src/operators/catchError.ts b/src/internal/operators/catchError.ts similarity index 91% rename from src/operators/catchError.ts rename to src/internal/operators/catchError.ts index 465c5e68ec..1f2c417263 100644 --- a/src/operators/catchError.ts +++ b/src/internal/operators/catchError.ts @@ -1,10 +1,10 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable, ObservableInput } from '../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable, ObservableInput } from '../../Observable'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /** * Catches errors on the observable to be handled by returning a new observable or throwing an error. diff --git a/src/operators/combineAll.ts b/src/internal/operators/combineAll.ts similarity index 50% rename from src/operators/combineAll.ts rename to src/internal/operators/combineAll.ts index 03c3cdb2f9..c63411db76 100644 --- a/src/operators/combineAll.ts +++ b/src/internal/operators/combineAll.ts @@ -1,6 +1,6 @@ -import { CombineLatestOperator } from '../internal/observable/combineLatest'; -import { Observable } from '../Observable'; -import { OperatorFunction } from '../interfaces'; +import { CombineLatestOperator } from '../../internal/observable/combineLatest'; +import { Observable } from '../../Observable'; +import { OperatorFunction } from '../../interfaces'; export function combineAll(project?: (...values: Array) => R): OperatorFunction { return (source: Observable) => source.lift(new CombineLatestOperator(project)); diff --git a/src/operators/concatAll.ts b/src/internal/operators/concatAll.ts similarity index 97% rename from src/operators/concatAll.ts rename to src/internal/operators/concatAll.ts index 22365048b0..62180c6bad 100644 --- a/src/operators/concatAll.ts +++ b/src/internal/operators/concatAll.ts @@ -1,6 +1,6 @@ import { mergeAll } from './mergeAll'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Converts a higher-order Observable into a first-order Observable by diff --git a/src/operators/concatMap.ts b/src/internal/operators/concatMap.ts similarity index 97% rename from src/operators/concatMap.ts rename to src/internal/operators/concatMap.ts index 1ffe4f819e..8b7f3f941e 100644 --- a/src/operators/concatMap.ts +++ b/src/internal/operators/concatMap.ts @@ -1,6 +1,6 @@ import { mergeMap } from './mergeMap'; -import { ObservableInput } from '../Observable'; -import { OperatorFunction } from '../interfaces'; +import { ObservableInput } from '../../Observable'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function concatMap(project: (value: T, index: number) => ObservableInput): OperatorFunction; diff --git a/src/operators/concatMapTo.ts b/src/internal/operators/concatMapTo.ts similarity index 96% rename from src/operators/concatMapTo.ts rename to src/internal/operators/concatMapTo.ts index e92af2495e..c86083a4f5 100644 --- a/src/operators/concatMapTo.ts +++ b/src/internal/operators/concatMapTo.ts @@ -1,6 +1,6 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable, ObservableInput } from '../../Observable'; import { concatMap } from './concatMap'; -import { OperatorFunction } from '../interfaces'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function concatMapTo(observable: ObservableInput): OperatorFunction; diff --git a/src/operators/count.ts b/src/internal/operators/count.ts similarity index 93% rename from src/operators/count.ts rename to src/internal/operators/count.ts index d2b19e4a8c..d17770d204 100644 --- a/src/operators/count.ts +++ b/src/internal/operators/count.ts @@ -1,8 +1,8 @@ -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Observer } from '../Observer'; -import { Subscriber } from '../Subscriber'; -import { OperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Observer } from '../../Observer'; +import { Subscriber } from '../../Subscriber'; +import { OperatorFunction } from '../../interfaces'; /** * Counts the number of emissions on the source and emits that number when the diff --git a/src/operators/debounce.ts b/src/internal/operators/debounce.ts similarity index 90% rename from src/operators/debounce.ts rename to src/internal/operators/debounce.ts index ed4637045d..b83d75ef45 100644 --- a/src/operators/debounce.ts +++ b/src/internal/operators/debounce.ts @@ -1,12 +1,12 @@ -import { Operator } from '../Operator'; -import { Observable, SubscribableOrPromise } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; +import { Operator } from '../../Operator'; +import { Observable, SubscribableOrPromise } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Subscription, TeardownLogic } from '../../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits a value from the source Observable only after a particular time span diff --git a/src/operators/debounceTime.ts b/src/internal/operators/debounceTime.ts similarity index 92% rename from src/operators/debounceTime.ts rename to src/internal/operators/debounceTime.ts index 9ecceada5f..db473dd295 100644 --- a/src/operators/debounceTime.ts +++ b/src/internal/operators/debounceTime.ts @@ -1,10 +1,10 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { IScheduler } from '../Scheduler'; -import { Subscription, TeardownLogic } from '../Subscription'; -import { async } from '../scheduler/async'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { IScheduler } from '../../Scheduler'; +import { Subscription, TeardownLogic } from '../../Subscription'; +import { async } from '../../scheduler/async'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits a value from the source Observable only after a particular time span diff --git a/src/operators/defaultIfEmpty.ts b/src/internal/operators/defaultIfEmpty.ts similarity index 91% rename from src/operators/defaultIfEmpty.ts rename to src/internal/operators/defaultIfEmpty.ts index c89a6d64c9..e405c9bfbd 100644 --- a/src/operators/defaultIfEmpty.ts +++ b/src/internal/operators/defaultIfEmpty.ts @@ -1,7 +1,7 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function defaultIfEmpty(defaultValue?: T): MonoTypeOperatorFunction; @@ -75,4 +75,4 @@ class DefaultIfEmptySubscriber extends Subscriber { } this.destination.complete(); } -} \ No newline at end of file +} diff --git a/src/operators/delay.ts b/src/internal/operators/delay.ts similarity index 89% rename from src/operators/delay.ts rename to src/internal/operators/delay.ts index 25d21eef12..107c482caf 100644 --- a/src/operators/delay.ts +++ b/src/internal/operators/delay.ts @@ -1,14 +1,14 @@ -import { async } from '../scheduler/async'; -import { isDate } from '../util/isDate'; -import { Operator } from '../Operator'; -import { IScheduler } from '../Scheduler'; -import { Subscriber } from '../Subscriber'; -import { Action } from '../scheduler/Action'; -import { Notification } from '../Notification'; -import { Observable } from '../Observable'; -import { PartialObserver } from '../Observer'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { async } from '../../scheduler/async'; +import { isDate } from '../../util/isDate'; +import { Operator } from '../../Operator'; +import { IScheduler } from '../../Scheduler'; +import { Subscriber } from '../../Subscriber'; +import { Action } from '../../scheduler/Action'; +import { Notification } from '../../Notification'; +import { Observable } from '../../Observable'; +import { PartialObserver } from '../../Observer'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Delays the emission of items from the source Observable by a given timeout or diff --git a/src/operators/delayWhen.ts b/src/internal/operators/delayWhen.ts similarity index 93% rename from src/operators/delayWhen.ts rename to src/internal/operators/delayWhen.ts index f9793813ab..7f7fc30d0f 100644 --- a/src/operators/delayWhen.ts +++ b/src/internal/operators/delayWhen.ts @@ -1,11 +1,11 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { Subscription, TeardownLogic } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subscription, TeardownLogic } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Delays the emission of items from the source Observable by a given time span diff --git a/src/operators/dematerialize.ts b/src/internal/operators/dematerialize.ts similarity index 90% rename from src/operators/dematerialize.ts rename to src/internal/operators/dematerialize.ts index 3422c7f518..d5d3a966f2 100644 --- a/src/operators/dematerialize.ts +++ b/src/internal/operators/dematerialize.ts @@ -1,8 +1,8 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Notification } from '../Notification'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Notification } from '../../Notification'; +import { OperatorFunction } from '../../interfaces'; /** * Converts an Observable of {@link Notification} objects into the emissions diff --git a/src/operators/distinct.ts b/src/internal/operators/distinct.ts similarity index 90% rename from src/operators/distinct.ts rename to src/internal/operators/distinct.ts index 76f6d198b9..735e6a6be4 100644 --- a/src/operators/distinct.ts +++ b/src/internal/operators/distinct.ts @@ -1,11 +1,11 @@ -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { TeardownLogic } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { TeardownLogic } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { MonoTypeOperatorFunction } from '../../interfaces'; if (!Set) { throw new Error('Set is not present, please polyfill'); diff --git a/src/operators/distinctUntilChanged.ts b/src/internal/operators/distinctUntilChanged.ts similarity index 90% rename from src/operators/distinctUntilChanged.ts rename to src/internal/operators/distinctUntilChanged.ts index 7226a0700e..d85e34bf52 100644 --- a/src/operators/distinctUntilChanged.ts +++ b/src/internal/operators/distinctUntilChanged.ts @@ -1,10 +1,10 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function distinctUntilChanged(compare?: (x: T, y: T) => boolean): MonoTypeOperatorFunction; diff --git a/src/operators/distinctUntilKeyChanged.ts b/src/internal/operators/distinctUntilKeyChanged.ts similarity index 97% rename from src/operators/distinctUntilKeyChanged.ts rename to src/internal/operators/distinctUntilKeyChanged.ts index 52ee021275..427f4f38c6 100644 --- a/src/operators/distinctUntilKeyChanged.ts +++ b/src/internal/operators/distinctUntilKeyChanged.ts @@ -1,5 +1,5 @@ import { distinctUntilChanged } from './distinctUntilChanged'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function distinctUntilKeyChanged(key: string): MonoTypeOperatorFunction; diff --git a/src/operators/elementAt.ts b/src/internal/operators/elementAt.ts similarity index 90% rename from src/operators/elementAt.ts rename to src/internal/operators/elementAt.ts index 551544bc02..351bfd5fe3 100644 --- a/src/operators/elementAt.ts +++ b/src/internal/operators/elementAt.ts @@ -1,9 +1,9 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { ArgumentOutOfRangeError } from '../../util/ArgumentOutOfRangeError'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits the single value at the specified `index` in a sequence of emissions diff --git a/src/operators/every.ts b/src/internal/operators/every.ts similarity index 90% rename from src/operators/every.ts rename to src/internal/operators/every.ts index c81497fdb0..4869d3dcca 100644 --- a/src/operators/every.ts +++ b/src/internal/operators/every.ts @@ -1,8 +1,8 @@ -import { Operator } from '../Operator'; -import { Observer } from '../Observer'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observer } from '../../Observer'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { OperatorFunction } from '../../interfaces'; /** * Returns an Observable that emits whether or not every item of the source satisfies the condition specified. diff --git a/src/operators/exhaust.ts b/src/internal/operators/exhaust.ts similarity index 87% rename from src/operators/exhaust.ts rename to src/internal/operators/exhaust.ts index d684516490..80cf766f23 100644 --- a/src/operators/exhaust.ts +++ b/src/internal/operators/exhaust.ts @@ -1,10 +1,10 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Subscription, TeardownLogic } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Converts a higher-order Observable into a first-order Observable by dropping diff --git a/src/operators/exhaustMap.ts b/src/internal/operators/exhaustMap.ts similarity index 92% rename from src/operators/exhaustMap.ts rename to src/internal/operators/exhaustMap.ts index 61ca1dcefc..cb4eabcef1 100644 --- a/src/operators/exhaustMap.ts +++ b/src/internal/operators/exhaustMap.ts @@ -1,11 +1,11 @@ -import { Operator } from '../Operator'; -import { Observable, ObservableInput } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable, ObservableInput } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Subscription } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function exhaustMap(project: (value: T, index: number) => ObservableInput): OperatorFunction; diff --git a/src/operators/expand.ts b/src/internal/operators/expand.ts similarity index 90% rename from src/operators/expand.ts rename to src/internal/operators/expand.ts index 78a9acbf13..f3b3fc384a 100644 --- a/src/operators/expand.ts +++ b/src/internal/operators/expand.ts @@ -1,14 +1,14 @@ -import { Observable } from '../Observable'; -import { IScheduler } from '../Scheduler'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; -import { Subscription } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction, OperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { IScheduler } from '../../Scheduler'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; +import { Subscription } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { MonoTypeOperatorFunction, OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function expand(project: (value: T, index: number) => Observable, concurrent?: number, scheduler?: IScheduler): MonoTypeOperatorFunction; diff --git a/src/operators/filter.ts b/src/internal/operators/filter.ts similarity index 92% rename from src/operators/filter.ts rename to src/internal/operators/filter.ts index 5fa064a02f..3105196442 100644 --- a/src/operators/filter.ts +++ b/src/internal/operators/filter.ts @@ -1,8 +1,8 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function filter(predicate: (value: T, index: number) => value is S, @@ -96,4 +96,4 @@ class FilterSubscriber extends Subscriber { this.destination.next(value); } } -} \ No newline at end of file +} diff --git a/src/operators/finalize.ts b/src/internal/operators/finalize.ts similarity index 80% rename from src/operators/finalize.ts rename to src/internal/operators/finalize.ts index cd5d905591..6035df6f53 100644 --- a/src/operators/finalize.ts +++ b/src/internal/operators/finalize.ts @@ -1,8 +1,8 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; -import { Observable } from '../Observable'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Subscription, TeardownLogic } from '../../Subscription'; +import { Observable } from '../../Observable'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Returns an Observable that mirrors the source Observable, but will call a specified function when diff --git a/src/operators/find.ts b/src/internal/operators/find.ts similarity index 94% rename from src/operators/find.ts rename to src/internal/operators/find.ts index 80fb0b213f..9a2d9150ed 100644 --- a/src/operators/find.ts +++ b/src/internal/operators/find.ts @@ -1,7 +1,7 @@ -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../../interfaces'; export function find(predicate: (value: T, index: number, source: Observable) => value is S, thisArg?: any): OperatorFunction; diff --git a/src/operators/findIndex.ts b/src/internal/operators/findIndex.ts similarity index 91% rename from src/operators/findIndex.ts rename to src/internal/operators/findIndex.ts index b33739a064..aa732cae87 100644 --- a/src/operators/findIndex.ts +++ b/src/internal/operators/findIndex.ts @@ -1,6 +1,6 @@ -import { Observable } from '../Observable'; -import { FindValueOperator } from '../operators/find'; -import { OperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { FindValueOperator } from '../../internal/operators/find'; +import { OperatorFunction } from '../../interfaces'; /** * Emits only the index of the first value emitted by the source Observable that * meets some condition. diff --git a/src/operators/first.ts b/src/internal/operators/first.ts similarity index 96% rename from src/operators/first.ts rename to src/internal/operators/first.ts index 263b2ded40..45d655290c 100644 --- a/src/operators/first.ts +++ b/src/internal/operators/first.ts @@ -1,8 +1,8 @@ -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { EmptyError } from '../util/EmptyError'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { EmptyError } from '../../util/EmptyError'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function first(predicate: (value: T, index: number, source: Observable) => value is S): OperatorFunction; export function first(predicate: (value: T | S, index: number, source: Observable) => value is S, diff --git a/src/operators/groupBy.ts b/src/internal/operators/groupBy.ts similarity index 97% rename from src/operators/groupBy.ts rename to src/internal/operators/groupBy.ts index f94e941fea..714044acbb 100644 --- a/src/operators/groupBy.ts +++ b/src/internal/operators/groupBy.ts @@ -1,9 +1,9 @@ -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Subject } from '../Subject'; -import { OperatorFunction } from '../interfaces'; +import { Subscriber } from '../../Subscriber'; +import { Subscription } from '../../Subscription'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subject } from '../../Subject'; +import { OperatorFunction } from '../../interfaces'; /** Assert that map is present for this operator */ if (!Map) { diff --git a/src/operators/ignoreElements.ts b/src/internal/operators/ignoreElements.ts similarity index 83% rename from src/operators/ignoreElements.ts rename to src/internal/operators/ignoreElements.ts index 56802e5cdb..bcb4383f63 100644 --- a/src/operators/ignoreElements.ts +++ b/src/internal/operators/ignoreElements.ts @@ -1,7 +1,7 @@ -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`. diff --git a/src/internal/operators/index.ts b/src/internal/operators/index.ts new file mode 100644 index 0000000000..6b72424eab --- /dev/null +++ b/src/internal/operators/index.ts @@ -0,0 +1,104 @@ +export { audit } from './audit'; +export { auditTime } from './auditTime'; +export { buffer } from './buffer'; +export { bufferCount } from './bufferCount'; +export { bufferTime } from './bufferTime'; +export { bufferToggle } from './bufferToggle'; +export { bufferWhen } from './bufferWhen'; +export { catchError } from './catchError'; +export { combineAll } from './combineAll'; +export { concatAll } from './concatAll'; +export { concatMap } from './concatMap'; +export { concatMapTo } from './concatMapTo'; +export { count } from './count'; +export { debounce } from './debounce'; +export { debounceTime } from './debounceTime'; +export { defaultIfEmpty } from './defaultIfEmpty'; +export { delay } from './delay'; +export { delayWhen } from './delayWhen'; +export { dematerialize } from './dematerialize'; +export { distinct } from './distinct'; +export { distinctUntilChanged } from './distinctUntilChanged'; +export { distinctUntilKeyChanged } from './distinctUntilKeyChanged'; +export { elementAt } from './elementAt'; +export { every } from './every'; +export { exhaust } from './exhaust'; +export { exhaustMap } from './exhaustMap'; +export { expand } from './expand'; +export { filter } from './filter'; +export { finalize } from './finalize'; +export { find } from './find'; +export { findIndex } from './findIndex'; +export { first } from './first'; +export { groupBy } from './groupBy'; +export { ignoreElements } from './ignoreElements'; +export { isEmpty } from './isEmpty'; +export { last } from './last'; +export { map } from './map'; +export { mapTo } from './mapTo'; +export { materialize } from './materialize'; +export { max } from './max'; +export { mergeAll } from './mergeAll'; +export { mergeMap } from './mergeMap'; +export { mergeMap as flatMap } from './mergeMap'; +export { mergeMapTo } from './mergeMapTo'; +export { mergeScan } from './mergeScan'; +export { min } from './min'; +export { multicast } from './multicast'; +export { observeOn } from './observeOn'; +export { onErrorResumeNext } from './onErrorResumeNext'; +export { pairwise } from './pairwise'; +export { partition } from './partition'; +export { pluck } from './pluck'; +export { publish } from './publish'; +export { publishBehavior } from './publishBehavior'; +export { publishLast } from './publishLast'; +export { publishReplay } from './publishReplay'; +export { race } from './race'; +export { reduce } from './reduce'; +export { repeat } from './repeat'; +export { repeatWhen } from './repeatWhen'; +export { retry } from './retry'; +export { retryWhen } from './retryWhen'; +export { refCount } from './refCount'; +export { sample } from './sample'; +export { sampleTime } from './sampleTime'; +export { scan } from './scan'; +export { sequenceEqual } from './sequenceEqual'; +export { share } from './share'; +export { shareReplay } from './shareReplay'; +export { single } from './single'; +export { skip } from './skip'; +export { skipLast } from './skipLast'; +export { skipUntil } from './skipUntil'; +export { skipWhile } from './skipWhile'; +export { startWith } from './startWith'; +/** + * TODO(https://github.com/ReactiveX/rxjs/issues/2900): Add back subscribeOn once it can be + * treeshaken. Currently if this export is added back, it + * forces apps to bring in asap scheduler along with + * Immediate, root, and other supporting code. + */ +// export { subscribeOn } from './subscribeOn'; +export { switchAll } from './switchAll'; +export { switchMap } from './switchMap'; +export { switchMapTo } from './switchMapTo'; +export { take } from './take'; +export { takeLast } from './takeLast'; +export { takeUntil } from './takeUntil'; +export { takeWhile } from './takeWhile'; +export { tap } from './tap'; +export { throttle } from './throttle'; +export { throttleTime } from './throttleTime'; +export { timeInterval } from './timeInterval'; +export { timeout } from './timeout'; +export { timeoutWith } from './timeoutWith'; +export { timestamp } from './timestamp'; +export { toArray } from './toArray'; +export { window } from './window'; +export { windowCount } from './windowCount'; +export { windowTime } from './windowTime'; +export { windowToggle } from './windowToggle'; +export { windowWhen } from './windowWhen'; +export { withLatestFrom } from './withLatestFrom'; +export { zipAll } from './zipAll'; diff --git a/src/operators/isEmpty.ts b/src/internal/operators/isEmpty.ts similarity index 81% rename from src/operators/isEmpty.ts rename to src/internal/operators/isEmpty.ts index f6b64d2849..0c5146b976 100644 --- a/src/operators/isEmpty.ts +++ b/src/internal/operators/isEmpty.ts @@ -1,7 +1,7 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { OperatorFunction } from '../../interfaces'; export function isEmpty(): OperatorFunction { return (source: Observable) => source.lift(new IsEmptyOperator()); diff --git a/src/operators/last.ts b/src/internal/operators/last.ts similarity index 94% rename from src/operators/last.ts rename to src/internal/operators/last.ts index a6891c02cb..866cc7af67 100644 --- a/src/operators/last.ts +++ b/src/internal/operators/last.ts @@ -1,8 +1,8 @@ -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { EmptyError } from '../util/EmptyError'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { EmptyError } from '../../util/EmptyError'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function last(predicate: (value: T, index: number, source: Observable) => value is S): OperatorFunction; diff --git a/src/operators/map.ts b/src/internal/operators/map.ts similarity index 93% rename from src/operators/map.ts rename to src/internal/operators/map.ts index 07b6b1f15b..e3fc6790ec 100644 --- a/src/operators/map.ts +++ b/src/internal/operators/map.ts @@ -1,7 +1,7 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { OperatorFunction } from '../../interfaces'; /** * Applies a given `project` function to each value emitted by the source diff --git a/src/operators/mapTo.ts b/src/internal/operators/mapTo.ts similarity index 89% rename from src/operators/mapTo.ts rename to src/internal/operators/mapTo.ts index 2dfebd75c8..e14cabdfd8 100644 --- a/src/operators/mapTo.ts +++ b/src/internal/operators/mapTo.ts @@ -1,7 +1,7 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { OperatorFunction } from '../../interfaces'; /** * Emits the given constant value on the output Observable every time the source @@ -63,4 +63,4 @@ class MapToSubscriber extends Subscriber { protected _next(x: T) { this.destination.next(this.value); } -} \ No newline at end of file +} diff --git a/src/operators/materialize.ts b/src/internal/operators/materialize.ts similarity index 92% rename from src/operators/materialize.ts rename to src/internal/operators/materialize.ts index 82f71e4088..f99e7964ac 100644 --- a/src/operators/materialize.ts +++ b/src/internal/operators/materialize.ts @@ -1,8 +1,8 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Notification } from '../Notification'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Notification } from '../../Notification'; +import { OperatorFunction } from '../../interfaces'; /** * Represents all of the notifications from the source Observable as `next` diff --git a/src/operators/max.ts b/src/internal/operators/max.ts similarity index 95% rename from src/operators/max.ts rename to src/internal/operators/max.ts index 0b8b9bafcd..5d757065f2 100644 --- a/src/operators/max.ts +++ b/src/internal/operators/max.ts @@ -1,5 +1,5 @@ import { reduce } from './reduce'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function), diff --git a/src/operators/mergeAll.ts b/src/internal/operators/mergeAll.ts similarity index 93% rename from src/operators/mergeAll.ts rename to src/internal/operators/mergeAll.ts index 8904ae86e8..992b7f0fb3 100644 --- a/src/operators/mergeAll.ts +++ b/src/internal/operators/mergeAll.ts @@ -1,8 +1,8 @@ -import { ObservableInput } from '../Observable'; +import { ObservableInput } from '../../Observable'; import { mergeMap } from './mergeMap'; -import { identity } from '../util/identity'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { identity } from '../../util/identity'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Converts a higher-order Observable into a first-order Observable which @@ -50,4 +50,4 @@ import { MonoTypeOperatorFunction } from '../interfaces'; */ export function mergeAll(concurrent: number = Number.POSITIVE_INFINITY): MonoTypeOperatorFunction { return mergeMap(identity as (value: T, index: number) => ObservableInput<{}>, null, concurrent); -} \ No newline at end of file +} diff --git a/src/operators/mergeMap.ts b/src/internal/operators/mergeMap.ts similarity index 93% rename from src/operators/mergeMap.ts rename to src/internal/operators/mergeMap.ts index e64634936d..461a2998d1 100644 --- a/src/operators/mergeMap.ts +++ b/src/internal/operators/mergeMap.ts @@ -1,11 +1,11 @@ -import { Observable, ObservableInput } from '../Observable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { OperatorFunction } from '../interfaces'; +import { Observable, ObservableInput } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Subscription } from '../../Subscription'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function mergeMap(project: (value: T, index: number) => ObservableInput, concurrent?: number): OperatorFunction; diff --git a/src/operators/mergeMapTo.ts b/src/internal/operators/mergeMapTo.ts similarity index 92% rename from src/operators/mergeMapTo.ts rename to src/internal/operators/mergeMapTo.ts index 5af1467aed..b3cc4faef1 100644 --- a/src/operators/mergeMapTo.ts +++ b/src/internal/operators/mergeMapTo.ts @@ -1,12 +1,12 @@ -import { Observable, ObservableInput } from '../Observable'; -import { Operator } from '../Operator'; -import { PartialObserver } from '../Observer'; -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Observable, ObservableInput } from '../../Observable'; +import { Operator } from '../../Operator'; +import { PartialObserver } from '../../Observer'; +import { Subscriber } from '../../Subscriber'; +import { Subscription } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function mergeMapTo(observable: ObservableInput, concurrent?: number): OperatorFunction; diff --git a/src/operators/mergeScan.ts b/src/internal/operators/mergeScan.ts similarity index 87% rename from src/operators/mergeScan.ts rename to src/internal/operators/mergeScan.ts index 34a1d407d9..331b7f89ff 100644 --- a/src/operators/mergeScan.ts +++ b/src/internal/operators/mergeScan.ts @@ -1,13 +1,13 @@ -import { Operator } from '../Operator'; -import { Observable, ObservableInput } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable, ObservableInput } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Subscription } from '../../Subscription'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { OperatorFunction } from '../../interfaces'; /** * Applies an accumulator function over the source Observable where the diff --git a/src/operators/min.ts b/src/internal/operators/min.ts similarity index 95% rename from src/operators/min.ts rename to src/internal/operators/min.ts index 99cdf8c1b4..c1b68e65a7 100644 --- a/src/operators/min.ts +++ b/src/internal/operators/min.ts @@ -1,5 +1,5 @@ import { reduce } from './reduce'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function), diff --git a/src/operators/multicast.ts b/src/internal/operators/multicast.ts similarity index 91% rename from src/operators/multicast.ts rename to src/internal/operators/multicast.ts index fb84b6773a..9fe1af5946 100644 --- a/src/operators/multicast.ts +++ b/src/internal/operators/multicast.ts @@ -1,9 +1,9 @@ -import { Subject } from '../Subject'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { ConnectableObservable, connectableObservableDescriptor } from '../internal/observable/ConnectableObservable'; -import { FactoryOrValue, MonoTypeOperatorFunction, OperatorFunction, UnaryFunction } from '../interfaces'; +import { Subject } from '../../Subject'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { ConnectableObservable, connectableObservableDescriptor } from '../../internal/observable/ConnectableObservable'; +import { FactoryOrValue, MonoTypeOperatorFunction, OperatorFunction, UnaryFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function multicast(subjectOrSubjectFactory: FactoryOrValue>): UnaryFunction, ConnectableObservable>; diff --git a/src/operators/observeOn.ts b/src/internal/operators/observeOn.ts similarity index 91% rename from src/operators/observeOn.ts rename to src/internal/operators/observeOn.ts index ab86f701f2..35e6a9fc23 100644 --- a/src/operators/observeOn.ts +++ b/src/internal/operators/observeOn.ts @@ -1,12 +1,12 @@ -import { Observable } from '../Observable'; -import { IScheduler } from '../Scheduler'; -import { Operator } from '../Operator'; -import { PartialObserver } from '../Observer'; -import { Subscriber } from '../Subscriber'; -import { Notification } from '../Notification'; -import { TeardownLogic } from '../Subscription'; -import { Action } from '../scheduler/Action'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { IScheduler } from '../../Scheduler'; +import { Operator } from '../../Operator'; +import { PartialObserver } from '../../Observer'; +import { Subscriber } from '../../Subscriber'; +import { Notification } from '../../Notification'; +import { TeardownLogic } from '../../Subscription'; +import { Action } from '../../scheduler/Action'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * diff --git a/src/operators/onErrorResumeNext.ts b/src/internal/operators/onErrorResumeNext.ts similarity index 93% rename from src/operators/onErrorResumeNext.ts rename to src/internal/operators/onErrorResumeNext.ts index 6238ed7616..d3206ab102 100644 --- a/src/operators/onErrorResumeNext.ts +++ b/src/internal/operators/onErrorResumeNext.ts @@ -1,12 +1,12 @@ -import { Observable, ObservableInput } from '../Observable'; -import { FromObservable } from '../internal/observable/FromObservable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { isArray } from '../util/isArray'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Observable, ObservableInput } from '../../Observable'; +import { FromObservable } from '../../internal/observable/FromObservable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { isArray } from '../../util/isArray'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function onErrorResumeNext(v: ObservableInput): OperatorFunction; diff --git a/src/operators/pairwise.ts b/src/internal/operators/pairwise.ts similarity index 91% rename from src/operators/pairwise.ts rename to src/internal/operators/pairwise.ts index 8a9657398c..3ee01cdff9 100644 --- a/src/operators/pairwise.ts +++ b/src/internal/operators/pairwise.ts @@ -1,7 +1,7 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { OperatorFunction } from '../../interfaces'; /** * Groups pairs of consecutive emissions together and emits them as an array of diff --git a/src/operators/partition.ts b/src/internal/operators/partition.ts similarity index 94% rename from src/operators/partition.ts rename to src/internal/operators/partition.ts index 845087ac20..5a875a8427 100644 --- a/src/operators/partition.ts +++ b/src/internal/operators/partition.ts @@ -1,7 +1,7 @@ -import { not } from '../util/not'; +import { not } from '../../util/not'; import { filter } from './filter'; -import { Observable } from '../Observable'; -import { UnaryFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { UnaryFunction } from '../../interfaces'; /** * Splits the source Observable into two, one with values that satisfy a diff --git a/src/operators/pluck.ts b/src/internal/operators/pluck.ts similarity index 94% rename from src/operators/pluck.ts rename to src/internal/operators/pluck.ts index 404ff1dfcd..4b5124a9d6 100644 --- a/src/operators/pluck.ts +++ b/src/internal/operators/pluck.ts @@ -1,6 +1,6 @@ -import { Observable } from '../Observable'; +import { Observable } from '../../Observable'; import { map } from './map'; -import { OperatorFunction } from '../interfaces'; +import { OperatorFunction } from '../../interfaces'; /** * Maps each source value (an object) to its specified nested property. diff --git a/src/operators/publish.ts b/src/internal/operators/publish.ts similarity index 87% rename from src/operators/publish.ts rename to src/internal/operators/publish.ts index be37ee145f..67fba8e8ff 100644 --- a/src/operators/publish.ts +++ b/src/internal/operators/publish.ts @@ -1,8 +1,8 @@ -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; +import { Observable } from '../../Observable'; +import { Subject } from '../../Subject'; import { multicast } from './multicast'; -import { ConnectableObservable } from '../internal/observable/ConnectableObservable'; -import { MonoTypeOperatorFunction, OperatorFunction, UnaryFunction } from '../interfaces'; +import { ConnectableObservable } from '../../internal/observable/ConnectableObservable'; +import { MonoTypeOperatorFunction, OperatorFunction, UnaryFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function publish(): UnaryFunction, ConnectableObservable>; diff --git a/src/operators/publishBehavior.ts b/src/internal/operators/publishBehavior.ts similarity index 60% rename from src/operators/publishBehavior.ts rename to src/internal/operators/publishBehavior.ts index 1dc49b9c1a..063c6a9ea9 100644 --- a/src/operators/publishBehavior.ts +++ b/src/internal/operators/publishBehavior.ts @@ -1,8 +1,8 @@ -import { Observable } from '../Observable'; -import { BehaviorSubject } from '../BehaviorSubject'; +import { Observable } from '../../Observable'; +import { BehaviorSubject } from '../../BehaviorSubject'; import { multicast } from './multicast'; -import { ConnectableObservable } from '../internal/observable/ConnectableObservable'; -import { UnaryFunction } from '../interfaces'; +import { ConnectableObservable } from '../../internal/observable/ConnectableObservable'; +import { UnaryFunction } from '../../interfaces'; /** * @param value diff --git a/src/internal/operators/publishLast.ts b/src/internal/operators/publishLast.ts new file mode 100644 index 0000000000..5dff1df172 --- /dev/null +++ b/src/internal/operators/publishLast.ts @@ -0,0 +1,9 @@ +import { Observable } from '../../Observable'; +import { AsyncSubject } from '../../AsyncSubject'; +import { multicast } from './multicast'; +import { ConnectableObservable } from '../../internal/observable/ConnectableObservable'; +import { UnaryFunction } from '../../interfaces'; + +export function publishLast(): UnaryFunction, ConnectableObservable> { + return (source: Observable) => multicast(new AsyncSubject())(source); +} diff --git a/src/operators/publishReplay.ts b/src/internal/operators/publishReplay.ts similarity index 84% rename from src/operators/publishReplay.ts rename to src/internal/operators/publishReplay.ts index 5628f2fb44..f340ab01f7 100644 --- a/src/operators/publishReplay.ts +++ b/src/internal/operators/publishReplay.ts @@ -1,9 +1,9 @@ -import { Observable } from '../Observable'; -import { ReplaySubject } from '../ReplaySubject'; -import { IScheduler } from '../Scheduler'; +import { Observable } from '../../Observable'; +import { ReplaySubject } from '../../ReplaySubject'; +import { IScheduler } from '../../Scheduler'; import { multicast } from './multicast'; -import { ConnectableObservable } from '../internal/observable/ConnectableObservable'; -import { UnaryFunction, MonoTypeOperatorFunction, OperatorFunction } from '../interfaces'; +import { ConnectableObservable } from '../../internal/observable/ConnectableObservable'; +import { UnaryFunction, MonoTypeOperatorFunction, OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function publishReplay(bufferSize?: number, windowTime?: number, scheduler?: IScheduler): UnaryFunction, ConnectableObservable>; diff --git a/src/operators/race.ts b/src/internal/operators/race.ts similarity index 85% rename from src/operators/race.ts rename to src/internal/operators/race.ts index 972dbf1e5c..d6293df6b5 100644 --- a/src/operators/race.ts +++ b/src/internal/operators/race.ts @@ -1,7 +1,7 @@ -import { Observable } from '../Observable'; -import { isArray } from '../util/isArray'; -import { MonoTypeOperatorFunction, OperatorFunction } from '../interfaces'; -import { race as raceStatic } from '../internal/observable/race'; +import { Observable } from '../../Observable'; +import { isArray } from '../../util/isArray'; +import { MonoTypeOperatorFunction, OperatorFunction } from '../../interfaces'; +import { race as raceStatic } from '../../internal/observable/race'; /* tslint:disable:max-line-length */ export function race(observables: Array>): MonoTypeOperatorFunction; diff --git a/src/operators/reduce.ts b/src/internal/operators/reduce.ts similarity index 95% rename from src/operators/reduce.ts rename to src/internal/operators/reduce.ts index 73ec81e2d7..7a0c118405 100644 --- a/src/operators/reduce.ts +++ b/src/internal/operators/reduce.ts @@ -1,9 +1,9 @@ -import { Observable } from '../Observable'; +import { Observable } from '../../Observable'; import { scan } from './scan'; import { takeLast } from './takeLast'; import { defaultIfEmpty } from './defaultIfEmpty'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../interfaces'; -import { pipe } from '../util/pipe'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../../interfaces'; +import { pipe } from '../../util/pipe'; /* tslint:disable:max-line-length */ export function reduce(accumulator: (acc: T, value: T, index: number) => T, seed?: T): MonoTypeOperatorFunction; diff --git a/src/operators/refCount.ts b/src/internal/operators/refCount.ts similarity index 88% rename from src/operators/refCount.ts rename to src/internal/operators/refCount.ts index 802e946809..ae09c673ff 100644 --- a/src/operators/refCount.ts +++ b/src/internal/operators/refCount.ts @@ -1,9 +1,9 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; -import { ConnectableObservable } from '../internal/observable/ConnectableObservable'; -import { Observable } from '../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Subscription, TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; +import { ConnectableObservable } from '../../internal/observable/ConnectableObservable'; +import { Observable } from '../../Observable'; export function refCount(): MonoTypeOperatorFunction { return function refCountOperatorFunction(source: ConnectableObservable): Observable { diff --git a/src/operators/repeat.ts b/src/internal/operators/repeat.ts similarity index 83% rename from src/operators/repeat.ts rename to src/internal/operators/repeat.ts index f11aee88de..b74112522e 100644 --- a/src/operators/repeat.ts +++ b/src/internal/operators/repeat.ts @@ -1,9 +1,9 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { EmptyObservable } from '../internal/observable/EmptyObservable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { EmptyObservable } from '../../internal/observable/EmptyObservable'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times. diff --git a/src/operators/repeatWhen.ts b/src/internal/operators/repeatWhen.ts similarity index 85% rename from src/operators/repeatWhen.ts rename to src/internal/operators/repeatWhen.ts index daa4fdaa20..7a77eb9e69 100644 --- a/src/operators/repeatWhen.ts +++ b/src/internal/operators/repeatWhen.ts @@ -1,16 +1,16 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { Subscription, TeardownLogic } from '../Subscription'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; - -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; - -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subject } from '../../Subject'; +import { Subscription, TeardownLogic } from '../../Subscription'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; + +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; + +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source diff --git a/src/operators/retry.ts b/src/internal/operators/retry.ts similarity index 88% rename from src/operators/retry.ts rename to src/internal/operators/retry.ts index b13113ed04..8063289114 100644 --- a/src/operators/retry.ts +++ b/src/internal/operators/retry.ts @@ -1,9 +1,9 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable diff --git a/src/operators/retryWhen.ts b/src/internal/operators/retryWhen.ts similarity index 84% rename from src/operators/retryWhen.ts rename to src/internal/operators/retryWhen.ts index 0764c515b3..41f52501bf 100644 --- a/src/operators/retryWhen.ts +++ b/src/internal/operators/retryWhen.ts @@ -1,16 +1,16 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { Subscription, TeardownLogic } from '../Subscription'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; - -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; - -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subject } from '../../Subject'; +import { Subscription, TeardownLogic } from '../../Subscription'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; + +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; + +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable diff --git a/src/operators/sample.ts b/src/internal/operators/sample.ts similarity index 85% rename from src/operators/sample.ts rename to src/internal/operators/sample.ts index 619e4f94d8..1452744efc 100644 --- a/src/operators/sample.ts +++ b/src/internal/operators/sample.ts @@ -1,12 +1,12 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { TeardownLogic } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { TeardownLogic } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits the most recently emitted value from the source Observable whenever diff --git a/src/operators/sampleTime.ts b/src/internal/operators/sampleTime.ts similarity index 88% rename from src/operators/sampleTime.ts rename to src/internal/operators/sampleTime.ts index 56046bb71c..00aca833dc 100644 --- a/src/operators/sampleTime.ts +++ b/src/internal/operators/sampleTime.ts @@ -1,12 +1,12 @@ -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { IScheduler } from '../Scheduler'; -import { Action } from '../scheduler/Action'; -import { async } from '../scheduler/async'; -import { TeardownLogic } from '../Subscription'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { IScheduler } from '../../Scheduler'; +import { Action } from '../../scheduler/Action'; +import { async } from '../../scheduler/async'; +import { TeardownLogic } from '../../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits the most recently emitted value from the source Observable within diff --git a/src/operators/scan.ts b/src/internal/operators/scan.ts similarity index 94% rename from src/operators/scan.ts rename to src/internal/operators/scan.ts index 0e97976d37..8562a32080 100644 --- a/src/operators/scan.ts +++ b/src/internal/operators/scan.ts @@ -1,7 +1,7 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function scan(accumulator: (acc: T, value: T, index: number) => T, seed?: T): MonoTypeOperatorFunction; diff --git a/src/operators/sequenceEqual.ts b/src/internal/operators/sequenceEqual.ts similarity index 93% rename from src/operators/sequenceEqual.ts rename to src/internal/operators/sequenceEqual.ts index 3edf89e0dc..eaff125711 100644 --- a/src/operators/sequenceEqual.ts +++ b/src/internal/operators/sequenceEqual.ts @@ -1,11 +1,11 @@ -import { Operator } from '../Operator'; -import { Observer } from '../Observer'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; +import { Operator } from '../../Operator'; +import { Observer } from '../../Observer'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; -import { OperatorFunction } from '../interfaces'; +import { OperatorFunction } from '../../interfaces'; /** * Compares all values of two observables in sequence using an optional comparor function diff --git a/src/operators/share.ts b/src/internal/operators/share.ts similarity index 86% rename from src/operators/share.ts rename to src/internal/operators/share.ts index 49d7988325..fa33d89555 100644 --- a/src/operators/share.ts +++ b/src/internal/operators/share.ts @@ -1,9 +1,9 @@ -import { Observable } from '../Observable'; +import { Observable } from '../../Observable'; import { multicast } from './multicast'; import { refCount } from './refCount'; -import { Subject } from '../Subject'; +import { Subject } from '../../Subject'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; function shareSubjectFactory() { return new Subject(); diff --git a/src/operators/shareReplay.ts b/src/internal/operators/shareReplay.ts similarity index 80% rename from src/operators/shareReplay.ts rename to src/internal/operators/shareReplay.ts index b212ba78d1..94fabe661b 100644 --- a/src/operators/shareReplay.ts +++ b/src/internal/operators/shareReplay.ts @@ -1,9 +1,9 @@ -import { Observable } from '../Observable'; -import { ReplaySubject } from '../ReplaySubject'; -import { IScheduler } from '../Scheduler'; -import { Subscription } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; -import { Subscriber } from '../Subscriber'; +import { Observable } from '../../Observable'; +import { ReplaySubject } from '../../ReplaySubject'; +import { IScheduler } from '../../Scheduler'; +import { Subscription } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; +import { Subscriber } from '../../Subscriber'; /** * @method shareReplay diff --git a/src/operators/single.ts b/src/internal/operators/single.ts similarity index 88% rename from src/operators/single.ts rename to src/internal/operators/single.ts index deb1053f08..45c48d59a4 100644 --- a/src/operators/single.ts +++ b/src/internal/operators/single.ts @@ -1,11 +1,11 @@ -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observer } from '../Observer'; -import { EmptyError } from '../util/EmptyError'; -import { TeardownLogic } from '../Subscription'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observer } from '../../Observer'; +import { EmptyError } from '../../util/EmptyError'; +import { TeardownLogic } from '../../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Returns an Observable that emits the single item emitted by the source Observable that matches a specified diff --git a/src/operators/skip.ts b/src/internal/operators/skip.ts similarity index 81% rename from src/operators/skip.ts rename to src/internal/operators/skip.ts index 4e848e82f5..9dee55fdd4 100644 --- a/src/operators/skip.ts +++ b/src/internal/operators/skip.ts @@ -1,8 +1,8 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Returns an Observable that skips the first `count` items emitted by the source Observable. diff --git a/src/operators/skipLast.ts b/src/internal/operators/skipLast.ts similarity index 88% rename from src/operators/skipLast.ts rename to src/internal/operators/skipLast.ts index a8547aa222..adedc433d3 100644 --- a/src/operators/skipLast.ts +++ b/src/internal/operators/skipLast.ts @@ -1,9 +1,9 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { ArgumentOutOfRangeError } from '../../util/ArgumentOutOfRangeError'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Skip the last `count` values emitted by the source Observable. @@ -88,4 +88,4 @@ class SkipLastSubscriber extends Subscriber { this.destination.next(oldValue); } } -} \ No newline at end of file +} diff --git a/src/operators/skipUntil.ts b/src/internal/operators/skipUntil.ts similarity index 81% rename from src/operators/skipUntil.ts rename to src/internal/operators/skipUntil.ts index 2bde030901..296257ef1c 100644 --- a/src/operators/skipUntil.ts +++ b/src/internal/operators/skipUntil.ts @@ -1,11 +1,11 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. diff --git a/src/operators/skipWhile.ts b/src/internal/operators/skipWhile.ts similarity index 87% rename from src/operators/skipWhile.ts rename to src/internal/operators/skipWhile.ts index 87fd43bd52..3617598d32 100644 --- a/src/operators/skipWhile.ts +++ b/src/internal/operators/skipWhile.ts @@ -1,8 +1,8 @@ -import { Observable } from '../Observable'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Observable } from '../../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds diff --git a/src/operators/startWith.ts b/src/internal/operators/startWith.ts similarity index 79% rename from src/operators/startWith.ts rename to src/internal/operators/startWith.ts index 2ebd70b0b8..74989b98a3 100644 --- a/src/operators/startWith.ts +++ b/src/internal/operators/startWith.ts @@ -1,11 +1,11 @@ -import { IScheduler } from '../Scheduler'; -import { Observable } from '../Observable'; -import { ArrayObservable } from '../internal/observable/ArrayObservable'; -import { ScalarObservable } from '../internal/observable/ScalarObservable'; -import { EmptyObservable } from '../internal/observable/EmptyObservable'; -import { concat as concatStatic } from '../internal/observable/concat'; -import { isScheduler } from '../util/isScheduler'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { IScheduler } from '../../Scheduler'; +import { Observable } from '../../Observable'; +import { ArrayObservable } from '../../internal/observable/ArrayObservable'; +import { ScalarObservable } from '../../internal/observable/ScalarObservable'; +import { EmptyObservable } from '../../internal/observable/EmptyObservable'; +import { concat as concatStatic } from '../../internal/observable/concat'; +import { isScheduler } from '../../util/isScheduler'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function startWith(v1: T, scheduler?: IScheduler): MonoTypeOperatorFunction; diff --git a/src/operators/subscribeOn.ts b/src/internal/operators/subscribeOn.ts similarity index 72% rename from src/operators/subscribeOn.ts rename to src/internal/operators/subscribeOn.ts index 5ab19f6f30..4d6bf2da3d 100644 --- a/src/operators/subscribeOn.ts +++ b/src/internal/operators/subscribeOn.ts @@ -1,10 +1,10 @@ -import { Operator } from '../Operator'; -import { IScheduler } from '../Scheduler'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { SubscribeOnObservable } from '../internal/observable/SubscribeOnObservable'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { IScheduler } from '../../Scheduler'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { SubscribeOnObservable } from '../../internal/observable/SubscribeOnObservable'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Asynchronously subscribes Observers to this Observable on the specified IScheduler. diff --git a/src/internal/operators/switchAll.ts b/src/internal/operators/switchAll.ts new file mode 100644 index 0000000000..da6843533c --- /dev/null +++ b/src/internal/operators/switchAll.ts @@ -0,0 +1,8 @@ +import { OperatorFunction } from '../../interfaces'; +import { Observable } from '../../Observable'; +import { switchMap } from './switchMap'; +import { identity } from '../../util/identity'; + +export function switchAll(): OperatorFunction, T> { + return switchMap(identity); +} diff --git a/src/operators/switchMap.ts b/src/internal/operators/switchMap.ts similarity index 92% rename from src/operators/switchMap.ts rename to src/internal/operators/switchMap.ts index 84199d0970..b168207956 100644 --- a/src/operators/switchMap.ts +++ b/src/internal/operators/switchMap.ts @@ -1,11 +1,11 @@ -import { Operator } from '../Operator'; -import { Observable, ObservableInput } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable, ObservableInput } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Subscription } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function switchMap(project: (value: T, index: number) => ObservableInput): OperatorFunction; diff --git a/src/operators/switchMapTo.ts b/src/internal/operators/switchMapTo.ts similarity index 92% rename from src/operators/switchMapTo.ts rename to src/internal/operators/switchMapTo.ts index ceb4fdc5dc..94eb8c47b0 100644 --- a/src/operators/switchMapTo.ts +++ b/src/internal/operators/switchMapTo.ts @@ -1,11 +1,11 @@ -import { Operator } from '../Operator'; -import { Observable, ObservableInput } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscription } from '../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable, ObservableInput } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Subscription } from '../../Subscription'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function switchMapTo(observable: ObservableInput): OperatorFunction; diff --git a/src/operators/take.ts b/src/internal/operators/take.ts similarity index 85% rename from src/operators/take.ts rename to src/internal/operators/take.ts index 2695722de2..9c2b4fa0e4 100644 --- a/src/operators/take.ts +++ b/src/internal/operators/take.ts @@ -1,10 +1,10 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; -import { EmptyObservable } from '../internal/observable/EmptyObservable'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { ArgumentOutOfRangeError } from '../../util/ArgumentOutOfRangeError'; +import { EmptyObservable } from '../../internal/observable/EmptyObservable'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits only the first `count` values emitted by the source Observable. diff --git a/src/operators/takeLast.ts b/src/internal/operators/takeLast.ts similarity index 88% rename from src/operators/takeLast.ts rename to src/internal/operators/takeLast.ts index f43d3fd0dd..af05a1d471 100644 --- a/src/operators/takeLast.ts +++ b/src/internal/operators/takeLast.ts @@ -1,10 +1,10 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; -import { EmptyObservable } from '../internal/observable/EmptyObservable'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { ArgumentOutOfRangeError } from '../../util/ArgumentOutOfRangeError'; +import { EmptyObservable } from '../../internal/observable/EmptyObservable'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits only the last `count` values emitted by the source Observable. diff --git a/src/operators/takeUntil.ts b/src/internal/operators/takeUntil.ts similarity index 84% rename from src/operators/takeUntil.ts rename to src/internal/operators/takeUntil.ts index ac49558a8c..53c76a0bff 100644 --- a/src/operators/takeUntil.ts +++ b/src/internal/operators/takeUntil.ts @@ -1,13 +1,13 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { TeardownLogic } from '../Subscription'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { TeardownLogic } from '../../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits the values emitted by the source Observable until a `notifier` diff --git a/src/operators/takeWhile.ts b/src/internal/operators/takeWhile.ts similarity index 92% rename from src/operators/takeWhile.ts rename to src/internal/operators/takeWhile.ts index 529b9f69db..75a033b00a 100644 --- a/src/operators/takeWhile.ts +++ b/src/internal/operators/takeWhile.ts @@ -1,8 +1,8 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits values emitted by the source Observable so long as each value satisfies diff --git a/src/operators/tap.ts b/src/internal/operators/tap.ts similarity index 91% rename from src/operators/tap.ts rename to src/internal/operators/tap.ts index 999f688351..b906521d38 100644 --- a/src/operators/tap.ts +++ b/src/internal/operators/tap.ts @@ -1,11 +1,11 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { PartialObserver } from '../Observer'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../interfaces'; -import { noop } from '../util/noop'; -import { isFunction } from '../util/isFunction'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { PartialObserver } from '../../Observer'; +import { TeardownLogic } from '../../Subscription'; +import { MonoTypeOperatorFunction } from '../../interfaces'; +import { noop } from '../../util/noop'; +import { isFunction } from '../../util/isFunction'; /* tslint:disable:max-line-length */ export function tap(next?: (x: T) => void, error?: (e: any) => void, complete?: () => void): MonoTypeOperatorFunction; diff --git a/src/operators/throttle.ts b/src/internal/operators/throttle.ts similarity index 91% rename from src/operators/throttle.ts rename to src/internal/operators/throttle.ts index f8085bd38a..0fc41efba9 100644 --- a/src/operators/throttle.ts +++ b/src/internal/operators/throttle.ts @@ -1,13 +1,13 @@ -import { Operator } from '../Operator'; -import { Observable, SubscribableOrPromise } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; +import { Operator } from '../../Operator'; +import { Observable, SubscribableOrPromise } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { Subscription, TeardownLogic } from '../../Subscription'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; export interface ThrottleConfig { leading?: boolean; diff --git a/src/operators/throttleTime.ts b/src/internal/operators/throttleTime.ts similarity index 91% rename from src/operators/throttleTime.ts rename to src/internal/operators/throttleTime.ts index d81920a38d..9d44d687f1 100644 --- a/src/operators/throttleTime.ts +++ b/src/internal/operators/throttleTime.ts @@ -1,11 +1,11 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { IScheduler } from '../Scheduler'; -import { Subscription, TeardownLogic } from '../Subscription'; -import { async } from '../scheduler/async'; -import { Observable } from '../Observable'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { IScheduler } from '../../Scheduler'; +import { Subscription, TeardownLogic } from '../../Subscription'; +import { async } from '../../scheduler/async'; +import { Observable } from '../../Observable'; import { ThrottleConfig, defaultThrottleConfig } from './throttle'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * Emits a value from the source Observable, then ignores subsequent source diff --git a/src/operators/timeInterval.ts b/src/internal/operators/timeInterval.ts similarity index 79% rename from src/operators/timeInterval.ts rename to src/internal/operators/timeInterval.ts index 65e5b36df8..82180847c2 100644 --- a/src/operators/timeInterval.ts +++ b/src/internal/operators/timeInterval.ts @@ -1,9 +1,9 @@ -import { Operator } from '../Operator'; -import { Observable } from '../Observable'; -import { Subscriber } from '../Subscriber'; -import { IScheduler } from '../Scheduler'; -import { async } from '../scheduler/async'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Observable } from '../../Observable'; +import { Subscriber } from '../../Subscriber'; +import { IScheduler } from '../../Scheduler'; +import { async } from '../../scheduler/async'; +import { OperatorFunction } from '../../interfaces'; export function timeInterval(scheduler: IScheduler = async): OperatorFunction> { return (source: Observable) => source.lift(new TimeIntervalOperator(scheduler)); diff --git a/src/operators/timeout.ts b/src/internal/operators/timeout.ts similarity index 92% rename from src/operators/timeout.ts rename to src/internal/operators/timeout.ts index ac313ce058..2e8c9e9b08 100644 --- a/src/operators/timeout.ts +++ b/src/internal/operators/timeout.ts @@ -1,13 +1,13 @@ -import { Action } from '../scheduler/Action'; -import { async } from '../scheduler/async'; -import { isDate } from '../util/isDate'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { IScheduler } from '../Scheduler'; -import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { TimeoutError } from '../util/TimeoutError'; -import { MonoTypeOperatorFunction } from '../interfaces'; +import { Action } from '../../scheduler/Action'; +import { async } from '../../scheduler/async'; +import { isDate } from '../../util/isDate'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { IScheduler } from '../../Scheduler'; +import { Observable } from '../../Observable'; +import { TeardownLogic } from '../../Subscription'; +import { TimeoutError } from '../../util/TimeoutError'; +import { MonoTypeOperatorFunction } from '../../interfaces'; /** * diff --git a/src/operators/timeoutWith.ts b/src/internal/operators/timeoutWith.ts similarity index 90% rename from src/operators/timeoutWith.ts rename to src/internal/operators/timeoutWith.ts index 2b92c56a6a..d791717524 100644 --- a/src/operators/timeoutWith.ts +++ b/src/internal/operators/timeoutWith.ts @@ -1,14 +1,14 @@ -import { Action } from '../scheduler/Action'; -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { IScheduler } from '../Scheduler'; -import { async } from '../scheduler/async'; -import { TeardownLogic } from '../Subscription'; -import { Observable, ObservableInput } from '../Observable'; -import { isDate } from '../util/isDate'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../interfaces'; +import { Action } from '../../scheduler/Action'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { IScheduler } from '../../Scheduler'; +import { async } from '../../scheduler/async'; +import { TeardownLogic } from '../../Subscription'; +import { Observable, ObservableInput } from '../../Observable'; +import { isDate } from '../../util/isDate'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function timeoutWith(due: number | Date, withObservable: ObservableInput, scheduler?: IScheduler): MonoTypeOperatorFunction; diff --git a/src/operators/timestamp.ts b/src/internal/operators/timestamp.ts similarity index 78% rename from src/operators/timestamp.ts rename to src/internal/operators/timestamp.ts index abb3121a6d..54b9bf5217 100644 --- a/src/operators/timestamp.ts +++ b/src/internal/operators/timestamp.ts @@ -1,7 +1,7 @@ -import { IScheduler } from '../Scheduler'; -import { async } from '../scheduler/async'; -import { OperatorFunction } from '../interfaces'; +import { IScheduler } from '../../Scheduler'; +import { async } from '../../scheduler/async'; +import { OperatorFunction } from '../../interfaces'; import { map } from './map'; /** diff --git a/src/operators/toArray.ts b/src/internal/operators/toArray.ts similarity index 85% rename from src/operators/toArray.ts rename to src/internal/operators/toArray.ts index 2148ad3e80..298cbd7147 100644 --- a/src/operators/toArray.ts +++ b/src/internal/operators/toArray.ts @@ -1,5 +1,5 @@ import { reduce } from './reduce'; -import { OperatorFunction } from '../interfaces'; +import { OperatorFunction } from '../../interfaces'; function toArrayReducer(arr: T[], item: T, index: number) { if (index === 0) { diff --git a/src/operators/window.ts b/src/internal/operators/window.ts similarity index 89% rename from src/operators/window.ts rename to src/internal/operators/window.ts index 54556694a9..246e8bf8f4 100644 --- a/src/operators/window.ts +++ b/src/internal/operators/window.ts @@ -1,11 +1,11 @@ -import { Observable } from '../Observable'; -import { OperatorFunction } from '../interfaces'; -import { Subject } from '../Subject'; -import { Subscriber } from '../Subscriber'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { Operator } from '../Operator'; +import { Observable } from '../../Observable'; +import { OperatorFunction } from '../../interfaces'; +import { Subject } from '../../Subject'; +import { Subscriber } from '../../Subscriber'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { Operator } from '../../Operator'; /** * Branch out the source Observable values as a nested Observable whenever diff --git a/src/operators/windowCount.ts b/src/internal/operators/windowCount.ts similarity index 95% rename from src/operators/windowCount.ts rename to src/internal/operators/windowCount.ts index a670eda41f..4ec55a11bd 100644 --- a/src/operators/windowCount.ts +++ b/src/internal/operators/windowCount.ts @@ -1,8 +1,8 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subject } from '../../Subject'; +import { OperatorFunction } from '../../interfaces'; /** * Branch out the source Observable values as a nested Observable with each diff --git a/src/operators/windowTime.ts b/src/internal/operators/windowTime.ts similarity index 94% rename from src/operators/windowTime.ts rename to src/internal/operators/windowTime.ts index 3dc6de4257..617398ba6e 100644 --- a/src/operators/windowTime.ts +++ b/src/internal/operators/windowTime.ts @@ -1,14 +1,14 @@ -import { IScheduler } from '../Scheduler'; -import { Action } from '../scheduler/Action'; -import { Subject } from '../Subject'; -import { Operator } from '../Operator'; -import { async } from '../scheduler/async'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { Subscription } from '../Subscription'; -import { isNumeric } from '../util/isNumeric'; -import { isScheduler } from '../util/isScheduler'; -import { OperatorFunction } from '../interfaces'; +import { IScheduler } from '../../Scheduler'; +import { Action } from '../../scheduler/Action'; +import { Subject } from '../../Subject'; +import { Operator } from '../../Operator'; +import { async } from '../../scheduler/async'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subscription } from '../../Subscription'; +import { isNumeric } from '../../util/isNumeric'; +import { isScheduler } from '../../util/isScheduler'; +import { OperatorFunction } from '../../interfaces'; /** * Branch out the source Observable values as a nested Observable periodically diff --git a/src/operators/windowToggle.ts b/src/internal/operators/windowToggle.ts similarity index 91% rename from src/operators/windowToggle.ts rename to src/internal/operators/windowToggle.ts index 0c91b61d77..1233485360 100644 --- a/src/operators/windowToggle.ts +++ b/src/internal/operators/windowToggle.ts @@ -1,14 +1,14 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subject } from '../../Subject'; +import { Subscription } from '../../Subscription'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /** * Branch out the source Observable values as a nested Observable starting from diff --git a/src/operators/windowWhen.ts b/src/internal/operators/windowWhen.ts similarity index 88% rename from src/operators/windowWhen.ts rename to src/internal/operators/windowWhen.ts index 3b629044b9..257d4e4659 100644 --- a/src/operators/windowWhen.ts +++ b/src/internal/operators/windowWhen.ts @@ -1,14 +1,14 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable } from '../Observable'; -import { Subject } from '../Subject'; -import { Subscription } from '../Subscription'; -import { tryCatch } from '../util/tryCatch'; -import { errorObject } from '../util/errorObject'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable } from '../../Observable'; +import { Subject } from '../../Subject'; +import { Subscription } from '../../Subscription'; +import { tryCatch } from '../../util/tryCatch'; +import { errorObject } from '../../util/errorObject'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /** * Branch out the source Observable values as a nested Observable using a diff --git a/src/operators/withLatestFrom.ts b/src/internal/operators/withLatestFrom.ts similarity index 94% rename from src/operators/withLatestFrom.ts rename to src/internal/operators/withLatestFrom.ts index 0c387515e7..09c5e73e9e 100644 --- a/src/operators/withLatestFrom.ts +++ b/src/internal/operators/withLatestFrom.ts @@ -1,10 +1,10 @@ -import { Operator } from '../Operator'; -import { Subscriber } from '../Subscriber'; -import { Observable, ObservableInput } from '../Observable'; -import { OuterSubscriber } from '../OuterSubscriber'; -import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '../util/subscribeToResult'; -import { OperatorFunction } from '../interfaces'; +import { Operator } from '../../Operator'; +import { Subscriber } from '../../Subscriber'; +import { Observable, ObservableInput } from '../../Observable'; +import { OuterSubscriber } from '../../OuterSubscriber'; +import { InnerSubscriber } from '../../InnerSubscriber'; +import { subscribeToResult } from '../../util/subscribeToResult'; +import { OperatorFunction } from '../../interfaces'; /* tslint:disable:max-line-length */ export function withLatestFrom(project: (v1: T) => R): OperatorFunction; diff --git a/src/operators/zipAll.ts b/src/internal/operators/zipAll.ts similarity index 51% rename from src/operators/zipAll.ts rename to src/internal/operators/zipAll.ts index b44d47cb89..0b0ee4693a 100644 --- a/src/operators/zipAll.ts +++ b/src/internal/operators/zipAll.ts @@ -1,6 +1,6 @@ -import { ZipOperator } from '../internal/observable/zip'; -import { Observable } from '../Observable'; -import { OperatorFunction } from '../interfaces'; +import { ZipOperator } from '../../internal/observable/zip'; +import { Observable } from '../../Observable'; +import { OperatorFunction } from '../../interfaces'; export function zipAll(project?: (...values: Array) => R): OperatorFunction { return (source: Observable) => source.lift(new ZipOperator(project)); diff --git a/src/internal/patching/operator/audit.ts b/src/internal/patching/operator/audit.ts index 8001c6f1aa..16a0f86e12 100644 --- a/src/internal/patching/operator/audit.ts +++ b/src/internal/patching/operator/audit.ts @@ -1,6 +1,6 @@ import { Observable, SubscribableOrPromise } from '../../../Observable'; -import { audit as higherOrder } from '../../../operators/audit'; +import { audit as higherOrder } from '../../../internal/operators/audit'; /** * Ignores source values for a duration determined by another Observable, then diff --git a/src/internal/patching/operator/auditTime.ts b/src/internal/patching/operator/auditTime.ts index 5bc3ca9686..9366958509 100644 --- a/src/internal/patching/operator/auditTime.ts +++ b/src/internal/patching/operator/auditTime.ts @@ -1,7 +1,7 @@ import { async } from '../../../scheduler/async'; import { IScheduler } from '../../../Scheduler'; import { Observable } from '../../../Observable'; -import { auditTime as higherOrder } from '../../../operators/auditTime'; +import { auditTime as higherOrder } from '../../../internal/operators/auditTime'; /** * Ignores source values for `duration` milliseconds, then emits the most recent diff --git a/src/internal/patching/operator/buffer.ts b/src/internal/patching/operator/buffer.ts index 83269fa389..82b49ff047 100644 --- a/src/internal/patching/operator/buffer.ts +++ b/src/internal/patching/operator/buffer.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { buffer as higherOrder } from '../../../operators/buffer'; +import { buffer as higherOrder } from '../../../internal/operators/buffer'; /** * Buffers the source Observable values until `closingNotifier` emits. diff --git a/src/internal/patching/operator/bufferCount.ts b/src/internal/patching/operator/bufferCount.ts index 2eb221d82e..a6ab68e922 100644 --- a/src/internal/patching/operator/bufferCount.ts +++ b/src/internal/patching/operator/bufferCount.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { bufferCount as higherOrder } from '../../../operators/bufferCount'; +import { bufferCount as higherOrder } from '../../../internal/operators/bufferCount'; /** * Buffers the source Observable values until the size hits the maximum diff --git a/src/internal/patching/operator/bufferTime.ts b/src/internal/patching/operator/bufferTime.ts index accee46a64..1c2cd75f48 100644 --- a/src/internal/patching/operator/bufferTime.ts +++ b/src/internal/patching/operator/bufferTime.ts @@ -2,7 +2,7 @@ import { IScheduler } from '../../../Scheduler'; import { async } from '../../../scheduler/async'; import { Observable } from '../../../Observable'; import { isScheduler } from '../../../util/isScheduler'; -import { bufferTime as higherOrder } from '../../../operators/bufferTime'; +import { bufferTime as higherOrder } from '../../../internal/operators/bufferTime'; /* tslint:disable:max-line-length */ export function bufferTime(this: Observable, bufferTimeSpan: number, scheduler?: IScheduler): Observable; diff --git a/src/internal/patching/operator/bufferToggle.ts b/src/internal/patching/operator/bufferToggle.ts index f5b942d05f..f73fc726d4 100644 --- a/src/internal/patching/operator/bufferToggle.ts +++ b/src/internal/patching/operator/bufferToggle.ts @@ -1,6 +1,6 @@ import { Observable, SubscribableOrPromise } from '../../../Observable'; -import { bufferToggle as higherOrder } from '../../../operators/bufferToggle'; +import { bufferToggle as higherOrder } from '../../../internal/operators/bufferToggle'; /** * Buffers the source Observable values starting from an emission from diff --git a/src/internal/patching/operator/bufferWhen.ts b/src/internal/patching/operator/bufferWhen.ts index f9f589cff8..8e68af74b7 100644 --- a/src/internal/patching/operator/bufferWhen.ts +++ b/src/internal/patching/operator/bufferWhen.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { bufferWhen as higherOrder } from '../../../operators/bufferWhen'; +import { bufferWhen as higherOrder } from '../../../internal/operators/bufferWhen'; /** * Buffers the source Observable values, using a factory function of closing diff --git a/src/internal/patching/operator/catch.ts b/src/internal/patching/operator/catch.ts index 1ed370b768..3ab67dbf50 100644 --- a/src/internal/patching/operator/catch.ts +++ b/src/internal/patching/operator/catch.ts @@ -1,6 +1,6 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { catchError as higherOrder } from '../../../operators/catchError'; +import { catchError as higherOrder } from '../../../internal/operators/catchError'; /** * Catches errors on the observable to be handled by returning a new observable or throwing an error. diff --git a/src/internal/patching/operator/combineAll.ts b/src/internal/patching/operator/combineAll.ts index fea65a17e3..76d3a67299 100644 --- a/src/internal/patching/operator/combineAll.ts +++ b/src/internal/patching/operator/combineAll.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { combineAll as higherOrder } from '../../../operators/combineAll'; +import { combineAll as higherOrder } from '../../../internal/operators/combineAll'; /** * Converts a higher-order Observable into a first-order Observable by waiting diff --git a/src/internal/patching/operator/concatAll.ts b/src/internal/patching/operator/concatAll.ts index 0ceb0d738f..c9bf1d0d6b 100644 --- a/src/internal/patching/operator/concatAll.ts +++ b/src/internal/patching/operator/concatAll.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; import { Subscribable } from '../../../Observable'; -import { concatAll as higherOrder } from '../../../operators/concatAll'; +import { concatAll as higherOrder } from '../../../internal/operators/concatAll'; /* tslint:disable:max-line-length */ export function concatAll(this: Observable): T; diff --git a/src/internal/patching/operator/concatMap.ts b/src/internal/patching/operator/concatMap.ts index b3ef8fba25..a220f4dd6b 100644 --- a/src/internal/patching/operator/concatMap.ts +++ b/src/internal/patching/operator/concatMap.ts @@ -1,4 +1,4 @@ -import { concatMap as higherOrderConcatMap } from '../../../operators/concatMap'; +import { concatMap as higherOrderConcatMap } from '../../../internal/operators/concatMap'; import { Observable, ObservableInput } from '../../../Observable'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/concatMapTo.ts b/src/internal/patching/operator/concatMapTo.ts index c55e58c259..81d2f61d6d 100644 --- a/src/internal/patching/operator/concatMapTo.ts +++ b/src/internal/patching/operator/concatMapTo.ts @@ -1,5 +1,5 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { concatMapTo as higherOrder } from '../../../operators/concatMapTo'; +import { concatMapTo as higherOrder } from '../../../internal/operators/concatMapTo'; /* tslint:disable:max-line-length */ export function concatMapTo(this: Observable, observable: ObservableInput): Observable; diff --git a/src/internal/patching/operator/count.ts b/src/internal/patching/operator/count.ts index d640eb09e7..152fcd5002 100644 --- a/src/internal/patching/operator/count.ts +++ b/src/internal/patching/operator/count.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { count as higherOrder } from '../../../operators/count'; +import { count as higherOrder } from '../../../internal/operators/count'; /** * Counts the number of emissions on the source and emits that number when the diff --git a/src/internal/patching/operator/debounce.ts b/src/internal/patching/operator/debounce.ts index 1c7728d742..7be5a29452 100644 --- a/src/internal/patching/operator/debounce.ts +++ b/src/internal/patching/operator/debounce.ts @@ -1,6 +1,6 @@ import { Observable, SubscribableOrPromise } from '../../../Observable'; -import { debounce as higherOrder } from '../../../operators/debounce'; +import { debounce as higherOrder } from '../../../internal/operators/debounce'; /** * Emits a value from the source Observable only after a particular time span diff --git a/src/internal/patching/operator/debounceTime.ts b/src/internal/patching/operator/debounceTime.ts index 76529d6129..871d6632b2 100644 --- a/src/internal/patching/operator/debounceTime.ts +++ b/src/internal/patching/operator/debounceTime.ts @@ -2,7 +2,7 @@ import { Observable } from '../../../Observable'; import { IScheduler } from '../../../Scheduler'; import { async } from '../../../scheduler/async'; -import { debounceTime as higherOrder } from '../../../operators/debounceTime'; +import { debounceTime as higherOrder } from '../../../internal/operators/debounceTime'; /** * Emits a value from the source Observable only after a particular time span diff --git a/src/internal/patching/operator/defaultIfEmpty.ts b/src/internal/patching/operator/defaultIfEmpty.ts index 066dcc120f..4abc4406ad 100644 --- a/src/internal/patching/operator/defaultIfEmpty.ts +++ b/src/internal/patching/operator/defaultIfEmpty.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { defaultIfEmpty as higherOrder } from '../../../operators/defaultIfEmpty'; +import { defaultIfEmpty as higherOrder } from '../../../internal/operators/defaultIfEmpty'; /* tslint:disable:max-line-length */ export function defaultIfEmpty(this: Observable, defaultValue?: T): Observable; diff --git a/src/internal/patching/operator/delay.ts b/src/internal/patching/operator/delay.ts index e6c53fcf5b..5e04020de9 100644 --- a/src/internal/patching/operator/delay.ts +++ b/src/internal/patching/operator/delay.ts @@ -1,7 +1,7 @@ import { async } from '../../../scheduler/async'; import { IScheduler } from '../../../Scheduler'; import { Observable } from '../../../Observable'; -import { delay as higherOrder } from '../../../operators/delay'; +import { delay as higherOrder } from '../../../internal/operators/delay'; /** * Delays the emission of items from the source Observable by a given timeout or diff --git a/src/internal/patching/operator/delayWhen.ts b/src/internal/patching/operator/delayWhen.ts index 36481d2d98..1e13680b84 100644 --- a/src/internal/patching/operator/delayWhen.ts +++ b/src/internal/patching/operator/delayWhen.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { delayWhen as higherOrder } from '../../../operators/delayWhen'; +import { delayWhen as higherOrder } from '../../../internal/operators/delayWhen'; /** * Delays the emission of items from the source Observable by a given time span diff --git a/src/internal/patching/operator/dematerialize.ts b/src/internal/patching/operator/dematerialize.ts index 02642a8771..b9f08cd139 100644 --- a/src/internal/patching/operator/dematerialize.ts +++ b/src/internal/patching/operator/dematerialize.ts @@ -1,7 +1,7 @@ import { Observable } from '../../../Observable'; import { Notification } from '../../../Notification'; -import { dematerialize as higherOrder } from '../../../operators/dematerialize'; +import { dematerialize as higherOrder } from '../../../internal/operators/dematerialize'; /** * Converts an Observable of {@link Notification} objects into the emissions diff --git a/src/internal/patching/operator/distinct.ts b/src/internal/patching/operator/distinct.ts index 190ae2798f..6083b9a73c 100644 --- a/src/internal/patching/operator/distinct.ts +++ b/src/internal/patching/operator/distinct.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { distinct as higherOrder } from '../../../operators/distinct'; +import { distinct as higherOrder } from '../../../internal/operators/distinct'; /** * Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from previous items. diff --git a/src/internal/patching/operator/distinctUntilChanged.ts b/src/internal/patching/operator/distinctUntilChanged.ts index 0683451d38..5f638f8303 100644 --- a/src/internal/patching/operator/distinctUntilChanged.ts +++ b/src/internal/patching/operator/distinctUntilChanged.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { distinctUntilChanged as higherOrder } from '../../../operators/distinctUntilChanged'; +import { distinctUntilChanged as higherOrder } from '../../../internal/operators/distinctUntilChanged'; /* tslint:disable:max-line-length */ export function distinctUntilChanged(this: Observable, compare?: (x: T, y: T) => boolean): Observable; diff --git a/src/internal/patching/operator/distinctUntilKeyChanged.ts b/src/internal/patching/operator/distinctUntilKeyChanged.ts index 3079e8f208..b0720517ad 100644 --- a/src/internal/patching/operator/distinctUntilKeyChanged.ts +++ b/src/internal/patching/operator/distinctUntilKeyChanged.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { distinctUntilKeyChanged as higherOrder } from '../../../operators/distinctUntilKeyChanged'; +import { distinctUntilKeyChanged as higherOrder } from '../../../internal/operators/distinctUntilKeyChanged'; /* tslint:disable:max-line-length */ export function distinctUntilKeyChanged(this: Observable, key: string): Observable; diff --git a/src/internal/patching/operator/do.ts b/src/internal/patching/operator/do.ts index 992fd85ad6..49abbe21e0 100644 --- a/src/internal/patching/operator/do.ts +++ b/src/internal/patching/operator/do.ts @@ -1,7 +1,7 @@ import { Observable } from '../../../Observable'; import { PartialObserver } from '../../../Observer'; -import { tap as higherOrder } from '../../../operators/tap'; +import { tap as higherOrder } from '../../../internal/operators/tap'; /* tslint:disable:max-line-length */ export function _do(this: Observable, next: (x: T) => void, error?: (e: any) => void, complete?: () => void): Observable; diff --git a/src/internal/patching/operator/elementAt.ts b/src/internal/patching/operator/elementAt.ts index ce8c55ade3..322d40d93b 100644 --- a/src/internal/patching/operator/elementAt.ts +++ b/src/internal/patching/operator/elementAt.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { elementAt as higherOrder } from '../../../operators/elementAt'; +import { elementAt as higherOrder } from '../../../internal/operators/elementAt'; /** * Emits the single value at the specified `index` in a sequence of emissions diff --git a/src/internal/patching/operator/every.ts b/src/internal/patching/operator/every.ts index 43689d6198..4a84a3e910 100644 --- a/src/internal/patching/operator/every.ts +++ b/src/internal/patching/operator/every.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { every as higherOrder } from '../../../operators/every'; +import { every as higherOrder } from '../../../internal/operators/every'; /** * Returns an Observable that emits whether or not every item of the source satisfies the condition specified. diff --git a/src/internal/patching/operator/exhaust.ts b/src/internal/patching/operator/exhaust.ts index 8bd1d8b205..8d2c021d89 100644 --- a/src/internal/patching/operator/exhaust.ts +++ b/src/internal/patching/operator/exhaust.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { exhaust as higherOrder } from '../../../operators/exhaust'; +import { exhaust as higherOrder } from '../../../internal/operators/exhaust'; /** * Converts a higher-order Observable into a first-order Observable by dropping diff --git a/src/internal/patching/operator/exhaustMap.ts b/src/internal/patching/operator/exhaustMap.ts index 92478d1546..0844438976 100644 --- a/src/internal/patching/operator/exhaustMap.ts +++ b/src/internal/patching/operator/exhaustMap.ts @@ -1,6 +1,6 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { exhaustMap as higherOrder } from '../../../operators/exhaustMap'; +import { exhaustMap as higherOrder } from '../../../internal/operators/exhaustMap'; /* tslint:disable:max-line-length */ export function exhaustMap(this: Observable, project: (value: T, index: number) => ObservableInput): Observable; diff --git a/src/internal/patching/operator/expand.ts b/src/internal/patching/operator/expand.ts index a00b2e5938..1997697c92 100644 --- a/src/internal/patching/operator/expand.ts +++ b/src/internal/patching/operator/expand.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; import { IScheduler } from '../../../Scheduler'; -import { expand as higherOrder } from '../../../operators/expand'; +import { expand as higherOrder } from '../../../internal/operators/expand'; /* tslint:disable:max-line-length */ export function expand(this: Observable, project: (value: T, index: number) => Observable, concurrent?: number, scheduler?: IScheduler): Observable; diff --git a/src/internal/patching/operator/filter.ts b/src/internal/patching/operator/filter.ts index b12c94895b..4e43dfccac 100644 --- a/src/internal/patching/operator/filter.ts +++ b/src/internal/patching/operator/filter.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { filter as higherOrderFilter } from '../../../operators/filter'; +import { filter as higherOrderFilter } from '../../../internal/operators/filter'; /* tslint:disable:max-line-length */ export function filter(this: Observable, diff --git a/src/internal/patching/operator/finally.ts b/src/internal/patching/operator/finally.ts index 897452cd5b..04cf405ed5 100644 --- a/src/internal/patching/operator/finally.ts +++ b/src/internal/patching/operator/finally.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { finalize } from '../../../operators/finalize'; +import { finalize } from '../../../internal/operators/finalize'; /** * Returns an Observable that mirrors the source Observable, but will call a specified function when diff --git a/src/internal/patching/operator/find.ts b/src/internal/patching/operator/find.ts index 377e18fb05..2eeda5c24f 100644 --- a/src/internal/patching/operator/find.ts +++ b/src/internal/patching/operator/find.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { find as higherOrder } from '../../../operators/find'; +import { find as higherOrder } from '../../../internal/operators/find'; /* tslint:disable:max-line-length */ export function find(this: Observable, diff --git a/src/internal/patching/operator/findIndex.ts b/src/internal/patching/operator/findIndex.ts index 6601633dc5..de575afaf0 100644 --- a/src/internal/patching/operator/findIndex.ts +++ b/src/internal/patching/operator/findIndex.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { findIndex as higherOrder } from '../../../operators/findIndex'; +import { findIndex as higherOrder } from '../../../internal/operators/findIndex'; /** * Emits only the index of the first value emitted by the source Observable that * meets some condition. diff --git a/src/internal/patching/operator/first.ts b/src/internal/patching/operator/first.ts index 079c04af2a..1d3550c74b 100644 --- a/src/internal/patching/operator/first.ts +++ b/src/internal/patching/operator/first.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { first as higherOrder } from '../../../operators/first'; +import { first as higherOrder } from '../../../internal/operators/first'; /* tslint:disable:max-line-length */ export function first(this: Observable, diff --git a/src/internal/patching/operator/groupBy.ts b/src/internal/patching/operator/groupBy.ts index 29117da71e..ab6ab02599 100644 --- a/src/internal/patching/operator/groupBy.ts +++ b/src/internal/patching/operator/groupBy.ts @@ -1,7 +1,7 @@ import { Observable } from '../../../Observable'; import { Subject } from '../../../Subject'; -import { groupBy as higherOrder, GroupedObservable } from '../../../operators/groupBy'; +import { groupBy as higherOrder, GroupedObservable } from '../../../internal/operators/groupBy'; export { GroupedObservable }; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/ignoreElements.ts b/src/internal/patching/operator/ignoreElements.ts index beecb8c750..2c456f732b 100644 --- a/src/internal/patching/operator/ignoreElements.ts +++ b/src/internal/patching/operator/ignoreElements.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { ignoreElements as higherOrder } from '../../../operators/ignoreElements'; +import { ignoreElements as higherOrder } from '../../../internal/operators/ignoreElements'; /** * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`. diff --git a/src/internal/patching/operator/isEmpty.ts b/src/internal/patching/operator/isEmpty.ts index 723fd40fa6..7632b2a0de 100644 --- a/src/internal/patching/operator/isEmpty.ts +++ b/src/internal/patching/operator/isEmpty.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { isEmpty as higherOrder } from '../../../operators/isEmpty'; +import { isEmpty as higherOrder } from '../../../internal/operators/isEmpty'; /** * If the source Observable is empty it returns an Observable that emits true, otherwise it emits false. diff --git a/src/internal/patching/operator/last.ts b/src/internal/patching/operator/last.ts index a993e0bfb7..84c842814e 100644 --- a/src/internal/patching/operator/last.ts +++ b/src/internal/patching/operator/last.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { last as higherOrder } from '../../../operators/last'; +import { last as higherOrder } from '../../../internal/operators/last'; /* tslint:disable:max-line-length */ export function last(this: Observable, diff --git a/src/internal/patching/operator/map.ts b/src/internal/patching/operator/map.ts index bb3998272a..79ebb3b0b1 100644 --- a/src/internal/patching/operator/map.ts +++ b/src/internal/patching/operator/map.ts @@ -1,4 +1,4 @@ -import { map as higherOrderMap } from '../../../operators/map'; +import { map as higherOrderMap } from '../../../internal/operators/map'; import { Observable } from '../../../Observable'; /** diff --git a/src/internal/patching/operator/mapTo.ts b/src/internal/patching/operator/mapTo.ts index 7a2bf25278..0b399d5890 100644 --- a/src/internal/patching/operator/mapTo.ts +++ b/src/internal/patching/operator/mapTo.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { mapTo as higherOrder } from '../../../operators/mapTo'; +import { mapTo as higherOrder } from '../../../internal/operators/mapTo'; /** * Emits the given constant value on the output Observable every time the source diff --git a/src/internal/patching/operator/materialize.ts b/src/internal/patching/operator/materialize.ts index 7c207d9d00..bea0a1726c 100644 --- a/src/internal/patching/operator/materialize.ts +++ b/src/internal/patching/operator/materialize.ts @@ -1,7 +1,7 @@ import { Observable } from '../../../Observable'; import { Notification } from '../../../Notification'; -import { materialize as higherOrder } from '../../../operators/materialize'; +import { materialize as higherOrder } from '../../../internal/operators/materialize'; /** * Represents all of the notifications from the source Observable as `next` diff --git a/src/internal/patching/operator/max.ts b/src/internal/patching/operator/max.ts index e638ad451b..1fe9c73eb6 100644 --- a/src/internal/patching/operator/max.ts +++ b/src/internal/patching/operator/max.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { max as higherOrderMax } from '../../../operators/max'; +import { max as higherOrderMax } from '../../../internal/operators/max'; /** * The Max operator operates on an Observable that emits numbers (or items that can be compared with a provided function), diff --git a/src/internal/patching/operator/mergeAll.ts b/src/internal/patching/operator/mergeAll.ts index a534d175ef..8a1448e7c2 100644 --- a/src/internal/patching/operator/mergeAll.ts +++ b/src/internal/patching/operator/mergeAll.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; import { Subscribable } from '../../../Observable'; -import { mergeAll as higherOrder } from '../../../operators/mergeAll'; +import { mergeAll as higherOrder } from '../../../internal/operators/mergeAll'; export function mergeAll(this: Observable, concurrent?: number): T; export function mergeAll(this: Observable, concurrent?: number): Subscribable; diff --git a/src/internal/patching/operator/mergeMap.ts b/src/internal/patching/operator/mergeMap.ts index 8b32dbcd99..be0837a3e1 100644 --- a/src/internal/patching/operator/mergeMap.ts +++ b/src/internal/patching/operator/mergeMap.ts @@ -1,5 +1,5 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { mergeMap as higherOrderMergeMap } from '../../../operators/mergeMap'; +import { mergeMap as higherOrderMergeMap } from '../../../internal/operators/mergeMap'; /* tslint:disable:max-line-length */ export function mergeMap(this: Observable, project: (value: T, index: number) => ObservableInput, concurrent?: number): Observable; diff --git a/src/internal/patching/operator/mergeMapTo.ts b/src/internal/patching/operator/mergeMapTo.ts index 351bdd1035..2792b48101 100644 --- a/src/internal/patching/operator/mergeMapTo.ts +++ b/src/internal/patching/operator/mergeMapTo.ts @@ -1,5 +1,5 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { mergeMapTo as higherOrder } from '../../../operators/mergeMapTo'; +import { mergeMapTo as higherOrder } from '../../../internal/operators/mergeMapTo'; /* tslint:disable:max-line-length */ export function mergeMapTo(this: Observable, observable: ObservableInput, concurrent?: number): Observable; diff --git a/src/internal/patching/operator/mergeScan.ts b/src/internal/patching/operator/mergeScan.ts index 57d4cf7ed5..6afa7ca81d 100644 --- a/src/internal/patching/operator/mergeScan.ts +++ b/src/internal/patching/operator/mergeScan.ts @@ -1,5 +1,5 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { mergeScan as higherOrder } from '../../../operators/mergeScan'; +import { mergeScan as higherOrder } from '../../operators/mergeScan'; /** * Applies an accumulator function over the source Observable where the diff --git a/src/internal/patching/operator/min.ts b/src/internal/patching/operator/min.ts index f36ba0e24f..b1ef3c35be 100644 --- a/src/internal/patching/operator/min.ts +++ b/src/internal/patching/operator/min.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { min as higherOrderMin } from '../../../operators/min'; +import { min as higherOrderMin } from '../../../internal/operators/min'; /** * The Min operator operates on an Observable that emits numbers (or items that can be compared with a provided function), diff --git a/src/internal/patching/operator/multicast.ts b/src/internal/patching/operator/multicast.ts index 69bfa546ed..34562496a1 100644 --- a/src/internal/patching/operator/multicast.ts +++ b/src/internal/patching/operator/multicast.ts @@ -1,7 +1,7 @@ import { Subject } from '../../../Subject'; import { Observable } from '../../../Observable'; import { ConnectableObservable } from '../../../internal/observable/ConnectableObservable'; -import { multicast as higherOrder } from '../../../operators/multicast'; +import { multicast as higherOrder } from '../../../internal/operators/multicast'; import { FactoryOrValue, MonoTypeOperatorFunction, OperatorFunction } from '../../../interfaces'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/observeOn.ts b/src/internal/patching/operator/observeOn.ts index 4292dc83e0..1f22a8badf 100644 --- a/src/internal/patching/operator/observeOn.ts +++ b/src/internal/patching/operator/observeOn.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; import { IScheduler } from '../../../Scheduler'; -import { observeOn as higherOrder } from '../../../operators/observeOn'; +import { observeOn as higherOrder } from '../../../internal/operators/observeOn'; /** * diff --git a/src/internal/patching/operator/onErrorResumeNext.ts b/src/internal/patching/operator/onErrorResumeNext.ts index 61ac83d319..fa98219030 100644 --- a/src/internal/patching/operator/onErrorResumeNext.ts +++ b/src/internal/patching/operator/onErrorResumeNext.ts @@ -1,5 +1,5 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { onErrorResumeNext as higherOrder } from '../../../operators/onErrorResumeNext'; +import { onErrorResumeNext as higherOrder } from '../../../internal/operators/onErrorResumeNext'; /* tslint:disable:max-line-length */ export function onErrorResumeNext(this: Observable, v: ObservableInput): Observable; diff --git a/src/internal/patching/operator/pairwise.ts b/src/internal/patching/operator/pairwise.ts index 6e3985ebbb..96001ab2d1 100644 --- a/src/internal/patching/operator/pairwise.ts +++ b/src/internal/patching/operator/pairwise.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { pairwise as higherOrder } from '../../../operators/pairwise'; +import { pairwise as higherOrder } from '../../../internal/operators/pairwise'; /** * Groups pairs of consecutive emissions together and emits them as an array of diff --git a/src/internal/patching/operator/partition.ts b/src/internal/patching/operator/partition.ts index 0ca6917aef..fa506d4ec5 100644 --- a/src/internal/patching/operator/partition.ts +++ b/src/internal/patching/operator/partition.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { partition as higherOrder } from '../../../operators/partition'; +import { partition as higherOrder } from '../../../internal/operators/partition'; /** * Splits the source Observable into two, one with values that satisfy a * predicate, and another with values that don't satisfy the predicate. diff --git a/src/internal/patching/operator/pluck.ts b/src/internal/patching/operator/pluck.ts index 443a64dd8d..90e31383a4 100644 --- a/src/internal/patching/operator/pluck.ts +++ b/src/internal/patching/operator/pluck.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { pluck as higherOrder } from '../../../operators/pluck'; +import { pluck as higherOrder } from '../../../internal/operators/pluck'; /** * Maps each source value (an object) to its specified nested property. diff --git a/src/internal/patching/operator/publish.ts b/src/internal/patching/operator/publish.ts index 4c8f1f6fe1..dab497db71 100644 --- a/src/internal/patching/operator/publish.ts +++ b/src/internal/patching/operator/publish.ts @@ -1,7 +1,7 @@ import { Observable } from '../../../Observable'; import { ConnectableObservable } from '../../../internal/observable/ConnectableObservable'; -import { publish as higherOrder } from '../../../operators/publish'; +import { publish as higherOrder } from '../../../internal/operators/publish'; /* tslint:disable:max-line-length */ export function publish(this: Observable): ConnectableObservable; diff --git a/src/internal/patching/operator/publishBehavior.ts b/src/internal/patching/operator/publishBehavior.ts index 9125fcddf9..abd1521ef0 100644 --- a/src/internal/patching/operator/publishBehavior.ts +++ b/src/internal/patching/operator/publishBehavior.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; import { ConnectableObservable } from '../../../internal/observable/ConnectableObservable'; -import { publishBehavior as higherOrder } from '../../../operators/publishBehavior'; +import { publishBehavior as higherOrder } from '../../../internal/operators/publishBehavior'; /** * @param value diff --git a/src/internal/patching/operator/publishLast.ts b/src/internal/patching/operator/publishLast.ts index 59fde13dde..bb9ae879d0 100644 --- a/src/internal/patching/operator/publishLast.ts +++ b/src/internal/patching/operator/publishLast.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; import { ConnectableObservable } from '../../../internal/observable/ConnectableObservable'; -import { publishLast as higherOrder } from '../../../operators/publishLast'; +import { publishLast as higherOrder } from '../../../internal/operators/publishLast'; /** * @return {ConnectableObservable} * @method publishLast diff --git a/src/internal/patching/operator/publishReplay.ts b/src/internal/patching/operator/publishReplay.ts index b0fdd00d17..0df7bd0f89 100644 --- a/src/internal/patching/operator/publishReplay.ts +++ b/src/internal/patching/operator/publishReplay.ts @@ -1,7 +1,7 @@ import { Observable } from '../../../Observable'; import { IScheduler } from '../../../Scheduler'; import { ConnectableObservable } from '../../../internal/observable/ConnectableObservable'; -import { publishReplay as higherOrder } from '../../../operators/publishReplay'; +import { publishReplay as higherOrder } from '../../../internal/operators/publishReplay'; import { OperatorFunction, MonoTypeOperatorFunction } from '../../../interfaces'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/race.ts b/src/internal/patching/operator/race.ts index 8f013f83ec..354b080fe0 100644 --- a/src/internal/patching/operator/race.ts +++ b/src/internal/patching/operator/race.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { race as higherOrder } from '../../../operators/race'; +import { race as higherOrder } from '../../../internal/operators/race'; // NOTE: to support backwards compatability with 5.4.* and lower export { race as raceStatic } from '../../../internal/observable/race'; diff --git a/src/internal/patching/operator/reduce.ts b/src/internal/patching/operator/reduce.ts index 5044f6a58d..320615e451 100644 --- a/src/internal/patching/operator/reduce.ts +++ b/src/internal/patching/operator/reduce.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { reduce as higherOrderReduce } from '../../../operators/reduce'; +import { reduce as higherOrderReduce } from '../../../internal/operators/reduce'; /* tslint:disable:max-line-length */ export function reduce(this: Observable, accumulator: (acc: T, value: T, index: number) => T, seed?: T): Observable; diff --git a/src/internal/patching/operator/repeat.ts b/src/internal/patching/operator/repeat.ts index b2a708cf5a..d2103d81b9 100644 --- a/src/internal/patching/operator/repeat.ts +++ b/src/internal/patching/operator/repeat.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { repeat as higherOrder } from '../../../operators/repeat'; +import { repeat as higherOrder } from '../../../internal/operators/repeat'; /** * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times. diff --git a/src/internal/patching/operator/repeatWhen.ts b/src/internal/patching/operator/repeatWhen.ts index ffad809a43..281701bbb4 100644 --- a/src/internal/patching/operator/repeatWhen.ts +++ b/src/internal/patching/operator/repeatWhen.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { repeatWhen as higherOrder } from '../../../operators/repeatWhen'; +import { repeatWhen as higherOrder } from '../../../internal/operators/repeatWhen'; /** * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source diff --git a/src/internal/patching/operator/retry.ts b/src/internal/patching/operator/retry.ts index b8956a1ed7..41c66e1ed1 100644 --- a/src/internal/patching/operator/retry.ts +++ b/src/internal/patching/operator/retry.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { retry as higherOrder } from '../../../operators/retry'; +import { retry as higherOrder } from '../../../internal/operators/retry'; /** * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable diff --git a/src/internal/patching/operator/retryWhen.ts b/src/internal/patching/operator/retryWhen.ts index 6dd6327a6e..2449570cd3 100644 --- a/src/internal/patching/operator/retryWhen.ts +++ b/src/internal/patching/operator/retryWhen.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { retryWhen as higherOrder } from '../../../operators/retryWhen'; +import { retryWhen as higherOrder } from '../../../internal/operators/retryWhen'; /** * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable * calls `error`, this method will emit the Throwable that caused the error to the Observable returned from `notifier`. diff --git a/src/internal/patching/operator/sample.ts b/src/internal/patching/operator/sample.ts index 4e37325b73..cc240346d0 100644 --- a/src/internal/patching/operator/sample.ts +++ b/src/internal/patching/operator/sample.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { sample as higherOrder } from '../../../operators/sample'; +import { sample as higherOrder } from '../../../internal/operators/sample'; /** * Emits the most recently emitted value from the source Observable whenever diff --git a/src/internal/patching/operator/sampleTime.ts b/src/internal/patching/operator/sampleTime.ts index 3cc76978e7..06c0ea0f48 100644 --- a/src/internal/patching/operator/sampleTime.ts +++ b/src/internal/patching/operator/sampleTime.ts @@ -1,7 +1,7 @@ import { Observable } from '../../../Observable'; import { IScheduler } from '../../../Scheduler'; import { async } from '../../../scheduler/async'; -import { sampleTime as higherOrder } from '../../../operators/sampleTime'; +import { sampleTime as higherOrder } from '../../../internal/operators/sampleTime'; /** * Emits the most recently emitted value from the source Observable within diff --git a/src/internal/patching/operator/scan.ts b/src/internal/patching/operator/scan.ts index 4f7d5a5fb8..eee9424158 100644 --- a/src/internal/patching/operator/scan.ts +++ b/src/internal/patching/operator/scan.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { scan as higherOrderScan } from '../../../operators/scan'; +import { scan as higherOrderScan } from '../../../internal/operators/scan'; /* tslint:disable:max-line-length */ export function scan(this: Observable, accumulator: (acc: T, value: T, index: number) => T, seed?: T): Observable; diff --git a/src/internal/patching/operator/sequenceEqual.ts b/src/internal/patching/operator/sequenceEqual.ts index 027145417c..f75ff7ce21 100644 --- a/src/internal/patching/operator/sequenceEqual.ts +++ b/src/internal/patching/operator/sequenceEqual.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { sequenceEqual as higherOrder } from '../../../operators/sequenceEqual'; +import { sequenceEqual as higherOrder } from '../../../internal/operators/sequenceEqual'; /** * Compares all values of two observables in sequence using an optional comparor function diff --git a/src/internal/patching/operator/share.ts b/src/internal/patching/operator/share.ts index 09e3e0aeeb..f15f32aa6c 100644 --- a/src/internal/patching/operator/share.ts +++ b/src/internal/patching/operator/share.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { share as higherOrder } from '../../../operators/share'; +import { share as higherOrder } from '../../../internal/operators/share'; /** * Returns a new Observable that multicasts (shares) the original Observable. As long as there is at least one diff --git a/src/internal/patching/operator/shareReplay.ts b/src/internal/patching/operator/shareReplay.ts index 870c16dad6..d7865367d2 100644 --- a/src/internal/patching/operator/shareReplay.ts +++ b/src/internal/patching/operator/shareReplay.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; import { IScheduler } from '../../../Scheduler'; -import { shareReplay as higherOrder } from '../../../operators/shareReplay'; +import { shareReplay as higherOrder } from '../../../internal/operators/shareReplay'; /** * @method shareReplay diff --git a/src/internal/patching/operator/single.ts b/src/internal/patching/operator/single.ts index 083ccc0924..5abfa29f84 100644 --- a/src/internal/patching/operator/single.ts +++ b/src/internal/patching/operator/single.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { single as higherOrder } from '../../../operators/single'; +import { single as higherOrder } from '../../../internal/operators/single'; /** * Returns an Observable that emits the single item emitted by the source Observable that matches a specified diff --git a/src/internal/patching/operator/skip.ts b/src/internal/patching/operator/skip.ts index fc5000576a..df45b563e8 100644 --- a/src/internal/patching/operator/skip.ts +++ b/src/internal/patching/operator/skip.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { skip as higherOrder } from '../../../operators/skip'; +import { skip as higherOrder } from '../../../internal/operators/skip'; /** * Returns an Observable that skips the first `count` items emitted by the source Observable. diff --git a/src/internal/patching/operator/skipLast.ts b/src/internal/patching/operator/skipLast.ts index 705b9191de..3db9b1a7d2 100644 --- a/src/internal/patching/operator/skipLast.ts +++ b/src/internal/patching/operator/skipLast.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { skipLast as higherOrder } from '../../../operators/skipLast'; +import { skipLast as higherOrder } from '../../../internal/operators/skipLast'; /** * Skip the last `count` values emitted by the source Observable. diff --git a/src/internal/patching/operator/skipUntil.ts b/src/internal/patching/operator/skipUntil.ts index ca60db2035..40debb0e03 100644 --- a/src/internal/patching/operator/skipUntil.ts +++ b/src/internal/patching/operator/skipUntil.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { skipUntil as higherOrder } from '../../../operators/skipUntil'; +import { skipUntil as higherOrder } from '../../../internal/operators/skipUntil'; /** * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. diff --git a/src/internal/patching/operator/skipWhile.ts b/src/internal/patching/operator/skipWhile.ts index 32ef3a753a..b95872c5de 100644 --- a/src/internal/patching/operator/skipWhile.ts +++ b/src/internal/patching/operator/skipWhile.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { skipWhile as higherOrder } from '../../../operators/skipWhile'; +import { skipWhile as higherOrder } from '../../../internal/operators/skipWhile'; /** * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds diff --git a/src/internal/patching/operator/startWith.ts b/src/internal/patching/operator/startWith.ts index 7c3cb82d41..3891a51c1a 100644 --- a/src/internal/patching/operator/startWith.ts +++ b/src/internal/patching/operator/startWith.ts @@ -1,6 +1,6 @@ import { IScheduler } from '../../../Scheduler'; import { Observable } from '../../../Observable'; -import { startWith as higherOrder } from '../../../operators/startWith'; +import { startWith as higherOrder } from '../../../internal/operators/startWith'; /* tslint:disable:max-line-length */ export function startWith(this: Observable, v1: T, scheduler?: IScheduler): Observable; diff --git a/src/internal/patching/operator/subscribeOn.ts b/src/internal/patching/operator/subscribeOn.ts index db2bdcdd2e..4268ebaeae 100644 --- a/src/internal/patching/operator/subscribeOn.ts +++ b/src/internal/patching/operator/subscribeOn.ts @@ -1,7 +1,7 @@ import { IScheduler } from '../../../Scheduler'; import { Observable } from '../../../Observable'; -import { subscribeOn as higherOrder } from '../../../operators/subscribeOn'; +import { subscribeOn as higherOrder } from '../../../internal/operators/subscribeOn'; /** * Asynchronously subscribes Observers to this Observable on the specified IScheduler. diff --git a/src/internal/patching/operator/switch.ts b/src/internal/patching/operator/switch.ts index c8e8db729e..e57148734a 100644 --- a/src/internal/patching/operator/switch.ts +++ b/src/internal/patching/operator/switch.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { switchAll as higherOrder } from '../../../operators/switchAll'; +import { switchAll as higherOrder } from '../../../internal/operators/switchAll'; /** * Converts a higher-order Observable into a first-order Observable by diff --git a/src/internal/patching/operator/switchMap.ts b/src/internal/patching/operator/switchMap.ts index de64f2bcb0..7118234d4f 100644 --- a/src/internal/patching/operator/switchMap.ts +++ b/src/internal/patching/operator/switchMap.ts @@ -1,6 +1,6 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { switchMap as higherOrderSwitchMap } from '../../../operators/switchMap'; +import { switchMap as higherOrderSwitchMap } from '../../../internal/operators/switchMap'; /* tslint:disable:max-line-length */ export function switchMap(this: Observable, project: (value: T, index: number) => ObservableInput): Observable; diff --git a/src/internal/patching/operator/switchMapTo.ts b/src/internal/patching/operator/switchMapTo.ts index c470f48785..333b1063da 100644 --- a/src/internal/patching/operator/switchMapTo.ts +++ b/src/internal/patching/operator/switchMapTo.ts @@ -1,5 +1,5 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { switchMapTo as higherOrder } from '../../../operators/switchMapTo'; +import { switchMapTo as higherOrder } from '../../../internal/operators/switchMapTo'; /* tslint:disable:max-line-length */ export function switchMapTo(this: Observable, observable: ObservableInput): Observable; diff --git a/src/internal/patching/operator/take.ts b/src/internal/patching/operator/take.ts index 19ecf52428..318ed48073 100644 --- a/src/internal/patching/operator/take.ts +++ b/src/internal/patching/operator/take.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { take as higherOrder } from '../../../operators/take'; +import { take as higherOrder } from '../../../internal/operators/take'; /** * Emits only the first `count` values emitted by the source Observable. diff --git a/src/internal/patching/operator/takeLast.ts b/src/internal/patching/operator/takeLast.ts index 63ae25883a..41c0f1f171 100644 --- a/src/internal/patching/operator/takeLast.ts +++ b/src/internal/patching/operator/takeLast.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { takeLast as higherOrderTakeLast } from '../../../operators/takeLast'; +import { takeLast as higherOrderTakeLast } from '../../../internal/operators/takeLast'; /** * Emits only the last `count` values emitted by the source Observable. diff --git a/src/internal/patching/operator/takeUntil.ts b/src/internal/patching/operator/takeUntil.ts index 6a82bb3280..ea83833a66 100644 --- a/src/internal/patching/operator/takeUntil.ts +++ b/src/internal/patching/operator/takeUntil.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { takeUntil as higherOrder } from '../../../operators/takeUntil'; +import { takeUntil as higherOrder } from '../../../internal/operators/takeUntil'; /** * Emits the values emitted by the source Observable until a `notifier` diff --git a/src/internal/patching/operator/takeWhile.ts b/src/internal/patching/operator/takeWhile.ts index ab264433b5..9320c65573 100644 --- a/src/internal/patching/operator/takeWhile.ts +++ b/src/internal/patching/operator/takeWhile.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { takeWhile as higherOrder } from '../../../operators/takeWhile'; +import { takeWhile as higherOrder } from '../../../internal/operators/takeWhile'; /** * Emits values emitted by the source Observable so long as each value satisfies diff --git a/src/internal/patching/operator/throttle.ts b/src/internal/patching/operator/throttle.ts index 1640bf3e64..ac9605303f 100644 --- a/src/internal/patching/operator/throttle.ts +++ b/src/internal/patching/operator/throttle.ts @@ -1,5 +1,5 @@ import { Observable, SubscribableOrPromise } from '../../../Observable'; -import { throttle as higherOrder, ThrottleConfig, defaultThrottleConfig } from '../../../operators/throttle'; +import { throttle as higherOrder, ThrottleConfig, defaultThrottleConfig } from '../../../internal/operators/throttle'; /** * Emits a value from the source Observable, then ignores subsequent source diff --git a/src/internal/patching/operator/throttleTime.ts b/src/internal/patching/operator/throttleTime.ts index a418a6b290..e6bb60b1e3 100644 --- a/src/internal/patching/operator/throttleTime.ts +++ b/src/internal/patching/operator/throttleTime.ts @@ -1,8 +1,8 @@ import { Observable } from '../../../Observable'; import { IScheduler } from '../../../Scheduler'; import { async } from '../../../scheduler/async'; -import { ThrottleConfig, defaultThrottleConfig } from '../../../operators/throttle'; -import { throttleTime as higherOrder } from '../../../operators/throttleTime'; +import { ThrottleConfig, defaultThrottleConfig } from '../../../internal/operators/throttle'; +import { throttleTime as higherOrder } from '../../../internal/operators/throttleTime'; /** * Emits a value from the source Observable, then ignores subsequent source diff --git a/src/internal/patching/operator/timeInterval.ts b/src/internal/patching/operator/timeInterval.ts index 7027072cda..cc754ba392 100644 --- a/src/internal/patching/operator/timeInterval.ts +++ b/src/internal/patching/operator/timeInterval.ts @@ -1,7 +1,7 @@ import { Observable } from '../../../Observable'; import { IScheduler } from '../../../Scheduler'; import { async } from '../../../scheduler/async'; -import { timeInterval as higherOrder, TimeInterval } from '../../../operators/timeInterval'; +import { timeInterval as higherOrder, TimeInterval } from '../../../internal/operators/timeInterval'; export {TimeInterval}; /** diff --git a/src/internal/patching/operator/timeout.ts b/src/internal/patching/operator/timeout.ts index a1df215c7b..269044d90c 100644 --- a/src/internal/patching/operator/timeout.ts +++ b/src/internal/patching/operator/timeout.ts @@ -1,7 +1,7 @@ import { async } from '../../../scheduler/async'; import { IScheduler } from '../../../Scheduler'; import { Observable } from '../../../Observable'; -import { timeout as higherOrder } from '../../../operators/timeout'; +import { timeout as higherOrder } from '../../../internal/operators/timeout'; /** * diff --git a/src/internal/patching/operator/timeoutWith.ts b/src/internal/patching/operator/timeoutWith.ts index ceea798b6f..100cd931fb 100644 --- a/src/internal/patching/operator/timeoutWith.ts +++ b/src/internal/patching/operator/timeoutWith.ts @@ -1,7 +1,7 @@ import { IScheduler } from '../../../Scheduler'; import { async } from '../../../scheduler/async'; import { Observable, ObservableInput } from '../../../Observable'; -import { timeoutWith as higherOrder } from '../../../operators/timeoutWith'; +import { timeoutWith as higherOrder } from '../../../internal/operators/timeoutWith'; /* tslint:disable:max-line-length */ export function timeoutWith(this: Observable, due: number | Date, withObservable: ObservableInput, scheduler?: IScheduler): Observable; diff --git a/src/internal/patching/operator/timestamp.ts b/src/internal/patching/operator/timestamp.ts index 0417f51ae6..b59f9c96ed 100644 --- a/src/internal/patching/operator/timestamp.ts +++ b/src/internal/patching/operator/timestamp.ts @@ -1,8 +1,8 @@ import { Observable } from '../../../Observable'; import { IScheduler } from '../../../Scheduler'; import { async } from '../../../scheduler/async'; -import { timestamp as higherOrder } from '../../../operators/timestamp'; -import { Timestamp } from '../../../operators/timestamp'; +import { timestamp as higherOrder } from '../../../internal/operators/timestamp'; +import { Timestamp } from '../../../internal/operators/timestamp'; /** * @param scheduler * @return {Observable>|WebSocketSubject|Observable} diff --git a/src/internal/patching/operator/toArray.ts b/src/internal/patching/operator/toArray.ts index 2a4b3195cd..4739426dc8 100644 --- a/src/internal/patching/operator/toArray.ts +++ b/src/internal/patching/operator/toArray.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { toArray as higherOrder } from '../../../operators/toArray'; +import { toArray as higherOrder } from '../../../internal/operators/toArray'; /** * Collects all source emissions and emits them as an array when the source completes. diff --git a/src/internal/patching/operator/window.ts b/src/internal/patching/operator/window.ts index b8d5b87bfa..6adfcf1761 100644 --- a/src/internal/patching/operator/window.ts +++ b/src/internal/patching/operator/window.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { window as higherOrder } from '../../../operators/window'; +import { window as higherOrder } from '../../../internal/operators/window'; /** * Branch out the source Observable values as a nested Observable whenever diff --git a/src/internal/patching/operator/windowCount.ts b/src/internal/patching/operator/windowCount.ts index 28b7bf0a99..4d6343d99e 100644 --- a/src/internal/patching/operator/windowCount.ts +++ b/src/internal/patching/operator/windowCount.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { windowCount as higherOrder } from '../../../operators/windowCount'; +import { windowCount as higherOrder } from '../../../internal/operators/windowCount'; /** * Branch out the source Observable values as a nested Observable with each diff --git a/src/internal/patching/operator/windowTime.ts b/src/internal/patching/operator/windowTime.ts index c04980de5b..0bbf228de7 100644 --- a/src/internal/patching/operator/windowTime.ts +++ b/src/internal/patching/operator/windowTime.ts @@ -3,7 +3,7 @@ import { async } from '../../../scheduler/async'; import { Observable } from '../../../Observable'; import { isNumeric } from '../../../util/isNumeric'; import { isScheduler } from '../../../util/isScheduler'; -import { windowTime as higherOrder } from '../../../operators/windowTime'; +import { windowTime as higherOrder } from '../../../internal/operators/windowTime'; /** * Branch out the source Observable values as a nested Observable periodically diff --git a/src/internal/patching/operator/windowToggle.ts b/src/internal/patching/operator/windowToggle.ts index 015f9947e9..bcfb44b6db 100644 --- a/src/internal/patching/operator/windowToggle.ts +++ b/src/internal/patching/operator/windowToggle.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { windowToggle as higherOrder } from '../../../operators/windowToggle'; +import { windowToggle as higherOrder } from '../../../internal/operators/windowToggle'; /** * Branch out the source Observable values as a nested Observable starting from diff --git a/src/internal/patching/operator/windowWhen.ts b/src/internal/patching/operator/windowWhen.ts index 0aefff5faf..7d67ee7bab 100644 --- a/src/internal/patching/operator/windowWhen.ts +++ b/src/internal/patching/operator/windowWhen.ts @@ -1,6 +1,6 @@ import { Observable } from '../../../Observable'; -import { windowWhen as higherOrder } from '../../../operators/windowWhen'; +import { windowWhen as higherOrder } from '../../../internal/operators/windowWhen'; /** * Branch out the source Observable values as a nested Observable using a diff --git a/src/internal/patching/operator/withLatestFrom.ts b/src/internal/patching/operator/withLatestFrom.ts index 0875900cc2..a60855b6a7 100644 --- a/src/internal/patching/operator/withLatestFrom.ts +++ b/src/internal/patching/operator/withLatestFrom.ts @@ -1,5 +1,5 @@ import { Observable, ObservableInput } from '../../../Observable'; -import { withLatestFrom as higherOrder } from '../../../operators/withLatestFrom'; +import { withLatestFrom as higherOrder } from '../../../internal/operators/withLatestFrom'; /* tslint:disable:max-line-length */ export function withLatestFrom(this: Observable, project: (v1: T) => R): Observable; diff --git a/src/internal/patching/operator/zipAll.ts b/src/internal/patching/operator/zipAll.ts index 59244a0254..2e94387ebe 100644 --- a/src/internal/patching/operator/zipAll.ts +++ b/src/internal/patching/operator/zipAll.ts @@ -1,5 +1,5 @@ import { Observable } from '../../../Observable'; -import { zipAll as higherOrder } from '../../../operators/zipAll'; +import { zipAll as higherOrder } from '../../../internal/operators/zipAll'; /** * @param project diff --git a/src/observable/combineLatest.ts b/src/observable/combineLatest.ts new file mode 100644 index 0000000000..eeab01255b --- /dev/null +++ b/src/observable/combineLatest.ts @@ -0,0 +1,161 @@ +import { Observable, ObservableInput } from '../Observable'; +import { IScheduler } from '../Scheduler'; +import { isScheduler } from '../util/isScheduler'; +import { isArray } from '../util/isArray'; +import { ArrayObservable } from './ArrayObservable'; +import { CombineLatestOperator } from '../internal/operators/combineLatest'; + +/* tslint:disable:max-line-length */ +export function combineLatest(v1: ObservableInput, project: (v1: T) => R, scheduler?: IScheduler): Observable; +export function combineLatest(v1: ObservableInput, v2: ObservableInput, project: (v1: T, v2: T2) => R, scheduler?: IScheduler): Observable; +export function combineLatest(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, project: (v1: T, v2: T2, v3: T3) => R, scheduler?: IScheduler): Observable; +export function combineLatest(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4) => R, scheduler?: IScheduler): Observable; +export function combineLatest(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5) => R, scheduler?: IScheduler): Observable; +export function combineLatest(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput, project: (v1: T, v2: T2, v3: T3, v4: T4, v5: T5, v6: T6) => R, scheduler?: IScheduler): Observable; + +export function combineLatest(v1: ObservableInput, v2: ObservableInput, scheduler?: IScheduler): Observable<[T, T2]>; +export function combineLatest(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, scheduler?: IScheduler): Observable<[T, T2, T3]>; +export function combineLatest(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, scheduler?: IScheduler): Observable<[T, T2, T3, T4]>; +export function combineLatest(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, scheduler?: IScheduler): Observable<[T, T2, T3, T4, T5]>; +export function combineLatest(v1: ObservableInput, v2: ObservableInput, v3: ObservableInput, v4: ObservableInput, v5: ObservableInput, v6: ObservableInput, scheduler?: IScheduler): Observable<[T, T2, T3, T4, T5, T6]>; + +export function combineLatest(array: ObservableInput[], scheduler?: IScheduler): Observable; +export function combineLatest(array: ObservableInput[], scheduler?: IScheduler): Observable; +export function combineLatest(array: ObservableInput[], project: (...values: Array) => R, scheduler?: IScheduler): Observable; +export function combineLatest(array: ObservableInput[], project: (...values: Array) => R, scheduler?: IScheduler): Observable; +export function combineLatest(...observables: Array | IScheduler>): Observable; +export function combineLatest(...observables: Array | ((...values: Array) => R) | IScheduler>): Observable; +export function combineLatest(...observables: Array | ((...values: Array) => R) | IScheduler>): Observable; +/* tslint:enable:max-line-length */ + +/** + * Combines multiple Observables to create an Observable whose values are + * calculated from the latest values of each of its input Observables. + * + * Whenever any input Observable emits a value, it + * computes a formula using the latest values from all the inputs, then emits + * the output of that formula. + * + * + * + * `combineLatest` combines the values from all the Observables passed as + * arguments. This is done by subscribing to each Observable in order and, + * whenever any Observable emits, collecting an array of the most recent + * values from each Observable. So if you pass `n` Observables to operator, + * returned Observable will always emit an array of `n` values, in order + * corresponding to order of passed Observables (value from the first Observable + * on the first place and so on). + * + * Static version of `combineLatest` accepts either an array of Observables + * or each Observable can be put directly as an argument. Note that array of + * Observables is good choice, if you don't know beforehand how many Observables + * you will combine. Passing empty array will result in Observable that + * completes immediately. + * + * To ensure output array has always the same length, `combineLatest` will + * actually wait for all input Observables to emit at least once, + * before it starts emitting results. This means if some Observable emits + * values before other Observables started emitting, all that values but last + * will be lost. On the other hand, is some Observable does not emit value but + * completes, resulting Observable will complete at the same moment without + * emitting anything, since it will be now impossible to include value from + * completed Observable in resulting array. Also, if some input Observable does + * not emit any value and never completes, `combineLatest` will also never emit + * and never complete, since, again, it will wait for all streams to emit some + * value. + * + * If at least one Observable was passed to `combineLatest` and all passed Observables + * emitted something, resulting Observable will complete when all combined + * streams complete. So even if some Observable completes, result of + * `combineLatest` will still emit values when other Observables do. In case + * of completed Observable, its value from now on will always be the last + * emitted value. On the other hand, if any Observable errors, `combineLatest` + * will error immediately as well, and all other Observables will be unsubscribed. + * + * `combineLatest` accepts as optional parameter `project` function, which takes + * as arguments all values that would normally be emitted by resulting Observable. + * `project` can return any kind of value, which will be then emitted by Observable + * instead of default array. Note that `project` does not take as argument that array + * of values, but values themselves. That means default `project` can be imagined + * as function that takes all its arguments and puts them into an array. + * + * + * @example Combine two timer Observables + * const firstTimer = Rx.Observable.timer(0, 1000); // emit 0, 1, 2... after every second, starting from now + * const secondTimer = Rx.Observable.timer(500, 1000); // emit 0, 1, 2... after every second, starting 0,5s from now + * const combinedTimers = Rx.Observable.combineLatest(firstTimer, secondTimer); + * combinedTimers.subscribe(value => console.log(value)); + * // Logs + * // [0, 0] after 0.5s + * // [1, 0] after 1s + * // [1, 1] after 1.5s + * // [2, 1] after 2s + * + * + * @example Combine an array of Observables + * const observables = [1, 5, 10].map( + * n => Rx.Observable.of(n).delay(n * 1000).startWith(0) // emit 0 and then emit n after n seconds + * ); + * const combined = Rx.Observable.combineLatest(observables); + * combined.subscribe(value => console.log(value)); + * // Logs + * // [0, 0, 0] immediately + * // [1, 0, 0] after 1s + * // [1, 5, 0] after 5s + * // [1, 5, 10] after 10s + * + * + * @example Use project function to dynamically calculate the Body-Mass Index + * var weight = Rx.Observable.of(70, 72, 76, 79, 75); + * var height = Rx.Observable.of(1.76, 1.77, 1.78); + * var bmi = Rx.Observable.combineLatest(weight, height, (w, h) => w / (h * h)); + * bmi.subscribe(x => console.log('BMI is ' + x)); + * + * // With output to console: + * // BMI is 24.212293388429753 + * // BMI is 23.93948099205209 + * // BMI is 23.671253629592222 + * + * + * @see {@link combineAll} + * @see {@link merge} + * @see {@link withLatestFrom} + * + * @param {ObservableInput} observable1 An input Observable to combine with other Observables. + * @param {ObservableInput} observable2 An input Observable to combine with other Observables. + * More than one input Observables may be given as arguments + * or an array of Observables may be given as the first argument. + * @param {function} [project] An optional function to project the values from + * the combined latest values into a new value on the output Observable. + * @param {Scheduler} [scheduler=null] The IScheduler to use for subscribing to + * each input Observable. + * @return {Observable} An Observable of projected values from the most recent + * values from each input Observable, or an array of the most recent values from + * each input Observable. + * @static true + * @name combineLatest + * @owner Observable + */ +export function combineLatest(...observables: Array | + Array> | + (((...values: Array) => R)) | + IScheduler>): Observable { + let project: (...values: Array) => R = null; + let scheduler: IScheduler = null; + + if (isScheduler(observables[observables.length - 1])) { + scheduler = observables.pop(); + } + + if (typeof observables[observables.length - 1] === 'function') { + project = <(...values: Array) => R>observables.pop(); + } + + // if the first and only other argument besides the resultSelector is an array + // assume it's been called with `combineLatest([obs1, obs2, obs3], project)` + if (observables.length === 1 && isArray(observables[0])) { + observables = >>observables[0]; + } + + return new ArrayObservable(observables, scheduler).lift(new CombineLatestOperator(project)); +} diff --git a/src/operators.ts b/src/operators.ts deleted file mode 100644 index dabe85f1b2..0000000000 --- a/src/operators.ts +++ /dev/null @@ -1,104 +0,0 @@ -export { audit } from './operators/audit'; -export { auditTime } from './operators/auditTime'; -export { buffer } from './operators/buffer'; -export { bufferCount } from './operators/bufferCount'; -export { bufferTime } from './operators/bufferTime'; -export { bufferToggle } from './operators/bufferToggle'; -export { bufferWhen } from './operators/bufferWhen'; -export { catchError } from './operators/catchError'; -export { combineAll } from './operators/combineAll'; -export { concatAll } from './operators/concatAll'; -export { concatMap } from './operators/concatMap'; -export { concatMapTo } from './operators/concatMapTo'; -export { count } from './operators/count'; -export { debounce } from './operators/debounce'; -export { debounceTime } from './operators/debounceTime'; -export { defaultIfEmpty } from './operators/defaultIfEmpty'; -export { delay } from './operators/delay'; -export { delayWhen } from './operators/delayWhen'; -export { dematerialize } from './operators/dematerialize'; -export { distinct } from './operators/distinct'; -export { distinctUntilChanged } from './operators/distinctUntilChanged'; -export { distinctUntilKeyChanged } from './operators/distinctUntilKeyChanged'; -export { elementAt } from './operators/elementAt'; -export { every } from './operators/every'; -export { exhaust } from './operators/exhaust'; -export { exhaustMap } from './operators/exhaustMap'; -export { expand } from './operators/expand'; -export { filter } from './operators/filter'; -export { finalize } from './operators/finalize'; -export { find } from './operators/find'; -export { findIndex } from './operators/findIndex'; -export { first } from './operators/first'; -export { groupBy } from './operators/groupBy'; -export { ignoreElements } from './operators/ignoreElements'; -export { isEmpty } from './operators/isEmpty'; -export { last } from './operators/last'; -export { map } from './operators/map'; -export { mapTo } from './operators/mapTo'; -export { materialize } from './operators/materialize'; -export { max } from './operators/max'; -export { mergeAll } from './operators/mergeAll'; -export { mergeMap } from './operators/mergeMap'; -export { mergeMap as flatMap } from './operators/mergeMap'; -export { mergeMapTo } from './operators/mergeMapTo'; -export { mergeScan } from './operators/mergeScan'; -export { min } from './operators/min'; -export { multicast } from './operators/multicast'; -export { observeOn } from './operators/observeOn'; -export { onErrorResumeNext } from './operators/onErrorResumeNext'; -export { pairwise } from './operators/pairwise'; -export { partition } from './operators/partition'; -export { pluck } from './operators/pluck'; -export { publish } from './operators/publish'; -export { publishBehavior } from './operators/publishBehavior'; -export { publishLast } from './operators/publishLast'; -export { publishReplay } from './operators/publishReplay'; -export { race } from './operators/race'; -export { reduce } from './operators/reduce'; -export { repeat } from './operators/repeat'; -export { repeatWhen } from './operators/repeatWhen'; -export { retry } from './operators/retry'; -export { retryWhen } from './operators/retryWhen'; -export { refCount } from './operators/refCount'; -export { sample } from './operators/sample'; -export { sampleTime } from './operators/sampleTime'; -export { scan } from './operators/scan'; -export { sequenceEqual } from './operators/sequenceEqual'; -export { share } from './operators/share'; -export { shareReplay } from './operators/shareReplay'; -export { single } from './operators/single'; -export { skip } from './operators/skip'; -export { skipLast } from './operators/skipLast'; -export { skipUntil } from './operators/skipUntil'; -export { skipWhile } from './operators/skipWhile'; -export { startWith } from './operators/startWith'; -/** - * TODO(https://github.com/ReactiveX/rxjs/issues/2900): Add back subscribeOn once it can be - * treeshaken. Currently if this export is added back, it - * forces apps to bring in asap scheduler along with - * Immediate, root, and other supporting code. - */ -// export { subscribeOn } from './operators/subscribeOn'; -export { switchAll } from './operators/switchAll'; -export { switchMap } from './operators/switchMap'; -export { switchMapTo } from './operators/switchMapTo'; -export { take } from './operators/take'; -export { takeLast } from './operators/takeLast'; -export { takeUntil } from './operators/takeUntil'; -export { takeWhile } from './operators/takeWhile'; -export { tap } from './operators/tap'; -export { throttle } from './operators/throttle'; -export { throttleTime } from './operators/throttleTime'; -export { timeInterval } from './operators/timeInterval'; -export { timeout } from './operators/timeout'; -export { timeoutWith } from './operators/timeoutWith'; -export { timestamp } from './operators/timestamp'; -export { toArray } from './operators/toArray'; -export { window } from './operators/window'; -export { windowCount } from './operators/windowCount'; -export { windowTime } from './operators/windowTime'; -export { windowToggle } from './operators/windowToggle'; -export { windowWhen } from './operators/windowWhen'; -export { withLatestFrom } from './operators/withLatestFrom'; -export { zipAll } from './operators/zipAll'; diff --git a/src/operators/publishLast.ts b/src/operators/publishLast.ts deleted file mode 100644 index aa1dd1975a..0000000000 --- a/src/operators/publishLast.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { Observable } from '../Observable'; -import { AsyncSubject } from '../AsyncSubject'; -import { multicast } from './multicast'; -import { ConnectableObservable } from '../internal/observable/ConnectableObservable'; -import { UnaryFunction } from '../interfaces'; - -export function publishLast(): UnaryFunction, ConnectableObservable> { - return (source: Observable) => multicast(new AsyncSubject())(source); -} diff --git a/src/operators/switchAll.ts b/src/operators/switchAll.ts deleted file mode 100644 index ec638fed74..0000000000 --- a/src/operators/switchAll.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { OperatorFunction } from '../interfaces'; -import { Observable } from '../Observable'; -import { switchMap } from './switchMap'; -import { identity } from '../util/identity'; - -export function switchAll(): OperatorFunction, T> { - return switchMap(identity); -}