diff --git a/spec/Observable-spec.ts b/spec/Observable-spec.ts index 94eafdda16..7379eee74b 100644 --- a/spec/Observable-spec.ts +++ b/spec/Observable-spec.ts @@ -1,8 +1,7 @@ import { expect } from 'chai'; import * as sinon from 'sinon'; import * as Rx from '../src/Rx'; -import { Observer } from './../src/internal/Observer'; -import { TeardownLogic } from '../src/internal/Subscription'; +import { Observer, TeardownLogic } from '../src/internal/types'; import { cold, expectObservable, expectSubscriptions } from './helpers/marble-testing'; import { map } from '../src/internal/operators/map'; //tslint:disable-next-line diff --git a/spec/helpers/test-helper.ts b/spec/helpers/test-helper.ts index de08c4f36f..06cc7d1e8c 100644 --- a/spec/helpers/test-helper.ts +++ b/spec/helpers/test-helper.ts @@ -1,7 +1,7 @@ declare const global: any; import * as Rx from '../../src/Rx'; -import { ObservableInput } from '../../src/internal/Observable'; +import { ObservableInput } from '../../src/internal/types'; import { root } from '../../src/internal/util/root'; import { $$iterator } from '../../src/internal/symbol/iterator'; import $$symbolObservable from 'symbol-observable'; diff --git a/src/MiscJSDoc.ts b/src/MiscJSDoc.ts index e3d067a8b9..9ba55f5627 100644 --- a/src/MiscJSDoc.ts +++ b/src/MiscJSDoc.ts @@ -5,10 +5,9 @@ * we need these bogus classes, which are not stripped away. This file on the * other hand, is not included in the release bundle. */ -import { TeardownLogic } from './internal/Subscription'; +import { Observer, TeardownLogic } from './internal/types'; import { Observable } from './internal/Observable'; import './internal/observable/dom/MiscJSDoc'; -import { Observer } from './internal/Observer'; /** * We need this JSDoc comment for affecting ESDoc. diff --git a/src/Rx.ts b/src/Rx.ts index 5c128c12ac..1384555389 100644 --- a/src/Rx.ts +++ b/src/Rx.ts @@ -144,7 +144,7 @@ import './add/operator/zipAll'; /* tslint:disable:no-unused-variable */ export {Operator} from './internal/Operator'; -export {Observer} from './internal/Observer'; +export {Observer} from './internal/types'; export {Subscription} from './internal/Subscription'; export {Subscriber} from './internal/Subscriber'; export {AsyncSubject} from './internal/AsyncSubject'; diff --git a/src/internal/BehaviorSubject.ts b/src/internal/BehaviorSubject.ts index 3b4a2398fc..a91407088e 100644 --- a/src/internal/BehaviorSubject.ts +++ b/src/internal/BehaviorSubject.ts @@ -1,6 +1,7 @@ import { Subject } from './Subject'; import { Subscriber } from './Subscriber'; -import { Subscription, ISubscription } from './Subscription'; +import { Subscription } from './Subscription'; +import { SubscriptionLike } from './types'; import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError'; /** @@ -18,7 +19,7 @@ export class BehaviorSubject extends Subject { protected _subscribe(subscriber: Subscriber): Subscription { const subscription = super._subscribe(subscriber); - if (subscription && !(subscription).closed) { + if (subscription && !(subscription).closed) { subscriber.next(this._value); } return subscription; diff --git a/src/internal/Notification.ts b/src/internal/Notification.ts index b7233cf759..f57b0186ed 100644 --- a/src/internal/Notification.ts +++ b/src/internal/Notification.ts @@ -1,4 +1,4 @@ -import { PartialObserver } from './Observer'; +import { PartialObserver } from './types'; import { Observable } from './Observable'; import { empty } from './observable/empty'; import { of } from './observable/of'; diff --git a/src/internal/Observable.ts b/src/internal/Observable.ts index c0331db67c..a4514b9c48 100644 --- a/src/internal/Observable.ts +++ b/src/internal/Observable.ts @@ -1,17 +1,14 @@ -import { PartialObserver } from './Observer'; import { Operator } from './Operator'; import { Subscriber } from './Subscriber'; -import { Subscription, AnonymousSubscription, TeardownLogic } from './Subscription'; +import { Subscription } from './Subscription'; +import { TeardownLogic } from './types'; import { root } from './util/root'; import { toSubscriber } from './util/toSubscriber'; import { IfObservable } from './observable/IfObservable'; import { observable as Symbol_observable } from '../internal/symbol/observable'; -import { OperatorFunction, Subscribable } from '../internal/types'; +import { OperatorFunction, PartialObserver, Subscribable } from '../internal/types'; import { pipeFromArray } from './util/pipe'; -//TODO(davidd): refactor all references to these to use types instead -export { Subscribable, ObservableLike, SubscribableOrPromise, ObservableInput } from '../internal/types'; - /** * A representation of any set of values over any amount of time. This is the most basic building block * of RxJS. @@ -20,9 +17,12 @@ export { Subscribable, ObservableLike, SubscribableOrPromise, ObservableInput } */ export class Observable implements Subscribable { + /** @internal */ public _isScalar: boolean = false; + /** @internal */ protected source: Observable; + /** @internal */ protected operator: Operator; /** @@ -243,6 +243,7 @@ export class Observable implements Subscribable { }); } + /** @internal */ protected _subscribe(subscriber: Subscriber): TeardownLogic { return this.source.subscribe(subscriber); } diff --git a/src/internal/Observer.ts b/src/internal/Observer.ts index 3a9d3ef218..bf3dc5dcaa 100644 --- a/src/internal/Observer.ts +++ b/src/internal/Observer.ts @@ -1,32 +1,4 @@ -export interface NextObserver { - closed?: boolean; - next: (value: T) => void; - error?: (err: any) => void; - complete?: () => void; -} - -export interface ErrorObserver { - closed?: boolean; - next?: (value: T) => void; - error: (err: any) => void; - complete?: () => void; -} - -export interface CompletionObserver { - closed?: boolean; - next?: (value: T) => void; - error?: (err: any) => void; - complete: () => void; -} - -export type PartialObserver = NextObserver | ErrorObserver | CompletionObserver; - -export interface Observer { - closed?: boolean; - next: (value: T) => void; - error: (err: any) => void; - complete: () => void; -} +import { Observer } from './types'; export const empty: Observer = { closed: true, diff --git a/src/internal/Operator.ts b/src/internal/Operator.ts index 12a768164d..93b65e6464 100644 --- a/src/internal/Operator.ts +++ b/src/internal/Operator.ts @@ -1,5 +1,5 @@ import { Subscriber } from './Subscriber'; -import { TeardownLogic } from './Subscription'; +import { TeardownLogic } from './types'; export interface Operator { call(subscriber: Subscriber, source: any): TeardownLogic; diff --git a/src/internal/Subject.ts b/src/internal/Subject.ts index e00a005b94..67a8be4997 100644 --- a/src/internal/Subject.ts +++ b/src/internal/Subject.ts @@ -1,8 +1,8 @@ import { Operator } from './Operator'; -import { Observer } from './Observer'; import { Observable } from './Observable'; import { Subscriber } from './Subscriber'; -import { ISubscription, Subscription, TeardownLogic } from './Subscription'; +import { Subscription } from './Subscription'; +import { Observer, SubscriptionLike, TeardownLogic } from './types'; import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError'; import { SubjectSubscription } from './SubjectSubscription'; import { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber'; @@ -19,7 +19,7 @@ export class SubjectSubscriber extends Subscriber { /** * @class Subject */ -export class Subject extends Observable implements ISubscription { +export class Subject extends Observable implements SubscriptionLike { [rxSubscriberSymbol]() { return new SubjectSubscriber(this); diff --git a/src/internal/SubjectSubscription.ts b/src/internal/SubjectSubscription.ts index c7080ed6f5..99af066dfb 100644 --- a/src/internal/SubjectSubscription.ts +++ b/src/internal/SubjectSubscription.ts @@ -1,5 +1,5 @@ import { Subject } from './Subject'; -import { Observer } from './Observer'; +import { Observer } from './types'; import { Subscription } from './Subscription'; /** diff --git a/src/internal/Subscriber.ts b/src/internal/Subscriber.ts index 7c569021ed..ebe5c880f4 100644 --- a/src/internal/Subscriber.ts +++ b/src/internal/Subscriber.ts @@ -1,5 +1,6 @@ import { isFunction } from './util/isFunction'; -import { Observer, PartialObserver, empty as emptyObserver } from './Observer'; +import { empty as emptyObserver } from './Observer'; +import { Observer, PartialObserver } from './types'; import { Subscription } from './Subscription'; import { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber'; diff --git a/src/internal/Subscription.ts b/src/internal/Subscription.ts index 166be73608..837d2ddcb3 100644 --- a/src/internal/Subscription.ts +++ b/src/internal/Subscription.ts @@ -4,17 +4,7 @@ import { isFunction } from './util/isFunction'; import { tryCatch } from './util/tryCatch'; import { errorObject } from './util/errorObject'; import { UnsubscriptionError } from './util/UnsubscriptionError'; - -export interface AnonymousSubscription { - unsubscribe(): void; -} - -export type TeardownLogic = AnonymousSubscription | Function | void; - -export interface ISubscription extends AnonymousSubscription { - unsubscribe(): void; - readonly closed: boolean; -} +import { SubscriptionLike, TeardownLogic } from './types'; /** * Represents a disposable resource, such as the execution of an Observable. A @@ -28,7 +18,7 @@ export interface ISubscription extends AnonymousSubscription { * * @class Subscription */ -export class Subscription implements ISubscription { +export class Subscription implements SubscriptionLike { public static EMPTY: Subscription = (function(empty: any) { empty.closed = true; return empty; @@ -40,9 +30,12 @@ export class Subscription implements ISubscription { */ public closed: boolean = false; + /** @internal */ protected _parent: Subscription = null; + /** @internal */ protected _parents: Subscription[] = null; - private _subscriptions: ISubscription[] = null; + /** @internal */ + private _subscriptions: SubscriptionLike[] = null; /** * @param {function(): void} [unsubscribe] A function describing how to @@ -51,6 +44,7 @@ export class Subscription implements ISubscription { constructor(unsubscribe?: () => void) { if (unsubscribe) { ( this)._unsubscribe = unsubscribe; + } } @@ -200,6 +194,7 @@ export class Subscription implements ISubscription { } } + /** @internal */ private _addParent(parent: Subscription) { let { _parent, _parents } = this; if (!_parent || _parent === parent) { diff --git a/src/internal/observable/BoundCallbackObservable.ts b/src/internal/observable/BoundCallbackObservable.ts index fbfed95fc7..ac24540b3b 100644 --- a/src/internal/observable/BoundCallbackObservable.ts +++ b/src/internal/observable/BoundCallbackObservable.ts @@ -2,8 +2,8 @@ import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; import { Subscription } from '../Subscription'; import { IScheduler } from '../Scheduler'; -import { tryCatch } from '..//util/tryCatch'; -import { errorObject } from '..//util/errorObject'; +import { tryCatch } from '../util/tryCatch'; +import { errorObject } from '../util/errorObject'; import { AsyncSubject } from '../../internal/AsyncSubject'; /** diff --git a/src/internal/observable/BoundNodeCallbackObservable.ts b/src/internal/observable/BoundNodeCallbackObservable.ts index a6b683fbf8..a53f8fe2c6 100644 --- a/src/internal/observable/BoundNodeCallbackObservable.ts +++ b/src/internal/observable/BoundNodeCallbackObservable.ts @@ -3,8 +3,8 @@ import { Subscriber } from '../Subscriber'; import { Subscription } from '../Subscription'; import { IScheduler } from '../Scheduler'; import { Action } from '../scheduler/Action'; -import { tryCatch } from '..//util/tryCatch'; -import { errorObject } from '..//util/errorObject'; +import { tryCatch } from '../util/tryCatch'; +import { errorObject } from '../util/errorObject'; import { AsyncSubject } from '../../internal/AsyncSubject'; /** diff --git a/src/internal/observable/ConnectableObservable.ts b/src/internal/observable/ConnectableObservable.ts index 5e0d5e7ed6..a8cb794461 100644 --- a/src/internal/observable/ConnectableObservable.ts +++ b/src/internal/observable/ConnectableObservable.ts @@ -2,7 +2,8 @@ import { Subject, SubjectSubscriber } from '../Subject'; import { Operator } from '../Operator'; import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; +import { Subscription } from '../Subscription'; +import { TeardownLogic } from '../types'; import { refCount as higherOrderRefCount } from '../../internal/operators/refCount'; /** @@ -13,6 +14,7 @@ export class ConnectableObservable extends Observable { protected _subject: Subject; protected _refCount: number = 0; protected _connection: Subscription; + /** @internal */ _isComplete = false; constructor(protected source: Observable, diff --git a/src/internal/observable/FromEventObservable.ts b/src/internal/observable/FromEventObservable.ts index 9dc6102c52..4cd7167874 100644 --- a/src/internal/observable/FromEventObservable.ts +++ b/src/internal/observable/FromEventObservable.ts @@ -1,7 +1,7 @@ import { Observable } from '../Observable'; -import { tryCatch } from '..//util/tryCatch'; -import { isFunction } from '..//util/isFunction'; -import { errorObject } from '..//util/errorObject'; +import { tryCatch } from '../util/tryCatch'; +import { isFunction } from '../util/isFunction'; +import { errorObject } from '../util/errorObject'; import { Subscription } from '../Subscription'; import { Subscriber } from '../Subscriber'; diff --git a/src/internal/observable/FromEventPatternObservable.ts b/src/internal/observable/FromEventPatternObservable.ts index a2dc826e65..f33ae98e11 100644 --- a/src/internal/observable/FromEventPatternObservable.ts +++ b/src/internal/observable/FromEventPatternObservable.ts @@ -1,4 +1,4 @@ -import { isFunction } from '..//util/isFunction'; +import { isFunction } from '../util/isFunction'; import { Observable } from '../Observable'; import { Subscription } from '../Subscription'; import { Subscriber } from '../Subscriber'; diff --git a/src/internal/observable/GenerateObservable.ts b/src/internal/observable/GenerateObservable.ts index 084533017a..38bec36c28 100644 --- a/src/internal/observable/GenerateObservable.ts +++ b/src/internal/observable/GenerateObservable.ts @@ -3,7 +3,7 @@ import { Action } from '../scheduler/Action'; import { Observable } from '../Observable' ; import { Subscriber } from '../Subscriber'; import { Subscription } from '../Subscription'; -import { isScheduler } from '..//util/isScheduler'; +import { isScheduler } from '../util/isScheduler'; const selfSelector = (value: T) => value; diff --git a/src/internal/observable/IfObservable.ts b/src/internal/observable/IfObservable.ts index c2adc60273..339e30f97a 100644 --- a/src/internal/observable/IfObservable.ts +++ b/src/internal/observable/IfObservable.ts @@ -1,8 +1,8 @@ -import { Observable, SubscribableOrPromise } from '../Observable'; +import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; -import { TeardownLogic } from '../Subscription'; +import { SubscribableOrPromise, TeardownLogic } from '../types'; -import { subscribeToResult } from '..//util/subscribeToResult'; +import { subscribeToResult } from '../util/subscribeToResult'; import { OuterSubscriber } from '../OuterSubscriber'; /** * We need this JSDoc comment for affecting ESDoc. diff --git a/src/internal/observable/SubscribeOnObservable.ts b/src/internal/observable/SubscribeOnObservable.ts index 35be9dfc10..eee1b3253b 100644 --- a/src/internal/observable/SubscribeOnObservable.ts +++ b/src/internal/observable/SubscribeOnObservable.ts @@ -4,7 +4,7 @@ import { Subscriber } from '../Subscriber'; import { Subscription } from '../Subscription'; import { Observable } from '../Observable'; import { asap } from '../scheduler/asap'; -import { isNumeric } from '..//util/isNumeric'; +import { isNumeric } from '../util/isNumeric'; export interface DispatchArg { source: Observable; diff --git a/src/internal/observable/UsingObservable.ts b/src/internal/observable/UsingObservable.ts index b7ac34c3d0..ec751adc73 100644 --- a/src/internal/observable/UsingObservable.ts +++ b/src/internal/observable/UsingObservable.ts @@ -1,8 +1,8 @@ -import { Observable, SubscribableOrPromise } from '../Observable'; +import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; -import { AnonymousSubscription, TeardownLogic } from '../Subscription'; +import { SubscribableOrPromise, Unsubscribable, TeardownLogic } from '../types'; -import { subscribeToResult } from '..//util/subscribeToResult'; +import { subscribeToResult } from '../util/subscribeToResult'; import { OuterSubscriber } from '../OuterSubscriber'; /** * We need this JSDoc comment for affecting ESDoc. @@ -41,23 +41,23 @@ export class UsingObservable extends Observable { * @name using * @owner Observable */ - static create(resourceFactory: () => AnonymousSubscription | void, - observableFactory: (resource: AnonymousSubscription) => SubscribableOrPromise | void): Observable { + static create(resourceFactory: () => Unsubscribable | void, + observableFactory: (resource: Unsubscribable) => SubscribableOrPromise | void): Observable { return new UsingObservable(resourceFactory, observableFactory); } - constructor(private resourceFactory: () => AnonymousSubscription | void, - private observableFactory: (resource: AnonymousSubscription) => SubscribableOrPromise | void) { + constructor(private resourceFactory: () => Unsubscribable | void, + private observableFactory: (resource: Unsubscribable) => SubscribableOrPromise | void) { super(); } protected _subscribe(subscriber: Subscriber): TeardownLogic { const { resourceFactory, observableFactory } = this; - let resource: AnonymousSubscription; + let resource: Unsubscribable; try { - resource = resourceFactory(); + resource = resourceFactory(); return new UsingSubscriber(subscriber, resource, observableFactory); } catch (err) { subscriber.error(err); @@ -67,8 +67,8 @@ export class UsingObservable extends Observable { class UsingSubscriber extends OuterSubscriber { constructor(destination: Subscriber, - private resource: AnonymousSubscription, - private observableFactory: (resource: AnonymousSubscription) => SubscribableOrPromise | void) { + private resource: Unsubscribable, + private observableFactory: (resource: Unsubscribable) => SubscribableOrPromise | void) { super(destination); destination.add(resource); this.tryUse(); diff --git a/src/internal/observable/combineLatest.ts b/src/internal/observable/combineLatest.ts index 6d6851a4bd..318e0a27e0 100644 --- a/src/internal/observable/combineLatest.ts +++ b/src/internal/observable/combineLatest.ts @@ -1,12 +1,13 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; +import { ObservableInput } from '../types'; import { IScheduler } from '../Scheduler'; -import { isScheduler } from '..//util/isScheduler'; -import { isArray } from '..//util/isArray'; +import { isScheduler } from '../util/isScheduler'; +import { isArray } from '../util/isArray'; import { Subscriber } from '../Subscriber'; import { OuterSubscriber } from '../OuterSubscriber'; import { Operator } from '../Operator'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; +import { subscribeToResult } from '../util/subscribeToResult'; import { fromArray } from './fromArray'; const NONE = {}; diff --git a/src/internal/observable/concat.ts b/src/internal/observable/concat.ts index a194c9619c..ef9df4cac2 100644 --- a/src/internal/observable/concat.ts +++ b/src/internal/observable/concat.ts @@ -1,6 +1,7 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; +import { ObservableInput } from '../types'; import { IScheduler } from '../Scheduler'; -import { isScheduler } from '..//util/isScheduler'; +import { isScheduler } from '../util/isScheduler'; import { of } from './of'; import { from } from './from'; import { concatAll } from '../../internal/operators/concatAll'; diff --git a/src/internal/observable/defer.ts b/src/internal/observable/defer.ts index 098c36adae..8d4d564098 100644 --- a/src/internal/observable/defer.ts +++ b/src/internal/observable/defer.ts @@ -1,4 +1,5 @@ -import { Observable, SubscribableOrPromise } from '../Observable'; +import { Observable } from '../Observable'; +import { SubscribableOrPromise } from '../types'; import { from } from './from'; // lol import { empty } from './empty'; diff --git a/src/internal/observable/dom/AjaxObservable.ts b/src/internal/observable/dom/AjaxObservable.ts index 6a3d397f7a..c12a3a9201 100644 --- a/src/internal/observable/dom/AjaxObservable.ts +++ b/src/internal/observable/dom/AjaxObservable.ts @@ -3,7 +3,7 @@ import { tryCatch } from '../..//util/tryCatch'; import { errorObject } from '../..//util/errorObject'; import { Observable } from '../../Observable'; import { Subscriber } from '../../Subscriber'; -import { TeardownLogic } from '../../Subscription'; +import { TeardownLogic } from '../../types'; import { map } from '../../../internal/operators/map'; export interface AjaxRequest { diff --git a/src/internal/observable/dom/WebSocketSubject.ts b/src/internal/observable/dom/WebSocketSubject.ts index 552e4def42..78ae1ba6df 100644 --- a/src/internal/observable/dom/WebSocketSubject.ts +++ b/src/internal/observable/dom/WebSocketSubject.ts @@ -5,7 +5,7 @@ import { Subscription } from '../../Subscription'; import { Operator } from '../../Operator'; import { root } from '../..//util/root'; import { ReplaySubject } from '../../ReplaySubject'; -import { Observer, NextObserver } from '../../Observer'; +import { Observer, NextObserver } from '../../types'; import { tryCatch } from '../..//util/tryCatch'; import { errorObject } from '../..//util/errorObject'; import { assign } from '../..//util/assign'; diff --git a/src/internal/observable/forkJoin.ts b/src/internal/observable/forkJoin.ts index c9e7767cb6..e4ff069c52 100644 --- a/src/internal/observable/forkJoin.ts +++ b/src/internal/observable/forkJoin.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; +import { ObservableInput } from '../types'; import { isArray } from '../util/isArray'; import { EMPTY } from './empty'; import { subscribeToResult } from '../util/subscribeToResult'; diff --git a/src/internal/observable/from.ts b/src/internal/observable/from.ts index 57ee9a8b12..f5ab8dccdf 100644 --- a/src/internal/observable/from.ts +++ b/src/internal/observable/from.ts @@ -4,7 +4,6 @@ import { isPromise } from '../util/isPromise'; import { isArrayLike } from '../util/isArrayLike'; import { isObservable } from '../util/isObservable'; import { isIterable } from '../util/isIterable'; -import { iterator as Symbol_iterator } from '../symbol/iterator'; import { fromArray } from './fromArray'; import { fromPromise } from './fromPromise'; import { fromIterable } from './fromIterable'; diff --git a/src/internal/observable/merge.ts b/src/internal/observable/merge.ts index 910b4cba4d..5622d8d57b 100644 --- a/src/internal/observable/merge.ts +++ b/src/internal/observable/merge.ts @@ -1,6 +1,7 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; +import { ObservableInput } from '../types'; import { IScheduler } from '../Scheduler'; -import { isScheduler } from '..//util/isScheduler'; +import { isScheduler } from '../util/isScheduler'; import { mergeAll } from '../../internal/operators/mergeAll'; import { fromArray } from './fromArray'; diff --git a/src/internal/observable/onErrorResumeNext.ts b/src/internal/observable/onErrorResumeNext.ts index 7fddb26547..2c5f1a1381 100644 --- a/src/internal/observable/onErrorResumeNext.ts +++ b/src/internal/observable/onErrorResumeNext.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; +import { ObservableInput } from '../types'; import { from } from './from'; import { isArray } from '../util/isArray'; import { EMPTY } from './empty'; diff --git a/src/internal/observable/race.ts b/src/internal/observable/race.ts index e25a666317..23576688b2 100644 --- a/src/internal/observable/race.ts +++ b/src/internal/observable/race.ts @@ -1,12 +1,13 @@ import { Observable } from '../Observable'; -import { isArray } from '..//util/isArray'; +import { isArray } from '../util/isArray'; import { fromArray } from './fromArray'; import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; +import { Subscription } from '../Subscription'; +import { TeardownLogic } from '../types'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; +import { subscribeToResult } from '../util/subscribeToResult'; /** * Returns an Observable that mirrors the first source Observable to emit an item. diff --git a/src/internal/observable/zip.ts b/src/internal/observable/zip.ts index 6c8612f5dd..c63f5b7a0d 100644 --- a/src/internal/observable/zip.ts +++ b/src/internal/observable/zip.ts @@ -1,12 +1,12 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; import { fromArray } from './fromArray'; -import { isArray } from '..//util/isArray'; +import { isArray } from '../util/isArray'; import { Operator } from '../Operator'; -import { PartialObserver } from '../Observer'; +import { ObservableInput, PartialObserver } from '../types'; import { Subscriber } from '../Subscriber'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; +import { subscribeToResult } from '../util/subscribeToResult'; import { iterator as Symbol_iterator } from '../../internal/symbol/iterator'; /* tslint:disable:max-line-length */ diff --git a/src/internal/operators/audit.ts b/src/internal/operators/audit.ts index 6308d0e67d..5c5381a9ca 100644 --- a/src/internal/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 { Observable } from '../Observable'; +import { Subscription } from '../Subscription'; +import { MonoTypeOperatorFunction, SubscribableOrPromise, TeardownLogic } from '../types'; -import { tryCatch } from '..//util/tryCatch'; -import { errorObject } from '..//util/errorObject'; +import { tryCatch } from '../util/tryCatch'; +import { errorObject } from '../util/errorObject'; import { OuterSubscriber } from '../OuterSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; /** * Ignores source values for a duration determined by another Observable, then diff --git a/src/internal/operators/auditTime.ts b/src/internal/operators/auditTime.ts index c347dc7950..26e233c4ac 100644 --- a/src/internal/operators/auditTime.ts +++ b/src/internal/operators/auditTime.ts @@ -2,7 +2,7 @@ import { async } from '../scheduler/async'; import { IScheduler } from '../Scheduler'; import { audit } from './audit'; import { timer } from '../observable/timer'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction } from '../types'; /** * Ignores source values for `duration` milliseconds, then emits the most recent diff --git a/src/internal/operators/buffer.ts b/src/internal/operators/buffer.ts index f496266b3d..c7e031d318 100644 --- a/src/internal/operators/buffer.ts +++ b/src/internal/operators/buffer.ts @@ -3,8 +3,8 @@ import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; -import { OperatorFunction } from '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { OperatorFunction } from '../types'; /** * Buffers the source Observable values until `closingNotifier` emits. diff --git a/src/internal/operators/bufferCount.ts b/src/internal/operators/bufferCount.ts index 3ba7261fd6..05a67cc48d 100644 --- a/src/internal/operators/bufferCount.ts +++ b/src/internal/operators/bufferCount.ts @@ -1,8 +1,7 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction, TeardownLogic } from '../types'; /** * Buffers the source Observable values until the size hits the maximum diff --git a/src/internal/operators/bufferTime.ts b/src/internal/operators/bufferTime.ts index de405ee8e4..e63f8519bb 100644 --- a/src/internal/operators/bufferTime.ts +++ b/src/internal/operators/bufferTime.ts @@ -5,8 +5,8 @@ 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 '../../internal/types'; +import { isScheduler } from '../util/isScheduler'; +import { OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function bufferTime(bufferTimeSpan: number, scheduler?: IScheduler): OperatorFunction; diff --git a/src/internal/operators/bufferToggle.ts b/src/internal/operators/bufferToggle.ts index 54e5f59b23..84789367ea 100644 --- a/src/internal/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 { Observable } from '../Observable'; import { Subscription } from '../Subscription'; -import { subscribeToResult } from '..//util/subscribeToResult'; +import { subscribeToResult } from '../util/subscribeToResult'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction, SubscribableOrPromise } from '../types'; /** * Buffers the source Observable values starting from an emission from diff --git a/src/internal/operators/bufferWhen.ts b/src/internal/operators/bufferWhen.ts index f5e39bfaed..96a69d0c7c 100644 --- a/src/internal/operators/bufferWhen.ts +++ b/src/internal/operators/bufferWhen.ts @@ -2,12 +2,12 @@ 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 { 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { OperatorFunction } from '../types'; /** * Buffers the source Observable values, using a factory function of closing diff --git a/src/internal/operators/catchError.ts b/src/internal/operators/catchError.ts index 4d82ee2703..16c8bbe15d 100644 --- a/src/internal/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 { Observable } from '../Observable'; import { OuterSubscriber } from '../OuterSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; -import { OperatorFunction } from '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { ObservableInput, OperatorFunction } from '../types'; /** * Catches errors on the observable to be handled by returning a new observable or throwing an error. diff --git a/src/internal/operators/combineAll.ts b/src/internal/operators/combineAll.ts index b714f4518b..72009ea7b8 100644 --- a/src/internal/operators/combineAll.ts +++ b/src/internal/operators/combineAll.ts @@ -1,6 +1,6 @@ import { CombineLatestOperator } from '../observable/combineLatest'; -import { Observable, ObservableInput } from '../Observable'; -import { OperatorFunction } from '../../internal/types'; +import { Observable } from '../Observable'; +import { OperatorFunction, ObservableInput } from '../types'; export function combineAll(): OperatorFunction, T[]>; export function combineAll(): OperatorFunction; diff --git a/src/internal/operators/concatAll.ts b/src/internal/operators/concatAll.ts index 32ffb4aba0..ad1ef51204 100644 --- a/src/internal/operators/concatAll.ts +++ b/src/internal/operators/concatAll.ts @@ -1,7 +1,6 @@ import { mergeAll } from './mergeAll'; -import { OperatorFunction } from '../../internal/types'; -import { ObservableInput, Observable } from '../Observable'; +import { OperatorFunction, ObservableInput } from '../types'; export function concatAll(): OperatorFunction, T>; export function concatAll(): OperatorFunction; diff --git a/src/internal/operators/concatMap.ts b/src/internal/operators/concatMap.ts index 40d89a129d..1ac7db96a6 100644 --- a/src/internal/operators/concatMap.ts +++ b/src/internal/operators/concatMap.ts @@ -1,6 +1,5 @@ import { mergeMap } from './mergeMap'; -import { ObservableInput } from '../Observable'; -import { OperatorFunction } from '../../internal/types'; +import { ObservableInput, OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function concatMap(project: (value: T, index: number) => ObservableInput): OperatorFunction; diff --git a/src/internal/operators/concatMapTo.ts b/src/internal/operators/concatMapTo.ts index 5471f1ef17..1399111592 100644 --- a/src/internal/operators/concatMapTo.ts +++ b/src/internal/operators/concatMapTo.ts @@ -1,6 +1,5 @@ -import { Observable, ObservableInput } from '../Observable'; import { concatMap } from './concatMap'; -import { OperatorFunction } from '../../internal/types'; +import { ObservableInput, OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function concatMapTo(observable: ObservableInput): OperatorFunction; diff --git a/src/internal/operators/count.ts b/src/internal/operators/count.ts index ed6e2030db..04c3ec7ba0 100644 --- a/src/internal/operators/count.ts +++ b/src/internal/operators/count.ts @@ -1,8 +1,7 @@ import { Observable } from '../Observable'; import { Operator } from '../Operator'; -import { Observer } from '../Observer'; +import { Observer, OperatorFunction } from '../types'; import { Subscriber } from '../Subscriber'; -import { OperatorFunction } from '../../internal/types'; /** * Counts the number of emissions on the source and emits that number when the diff --git a/src/internal/operators/debounce.ts b/src/internal/operators/debounce.ts index e728ecfb6d..0bba39ae6e 100644 --- a/src/internal/operators/debounce.ts +++ b/src/internal/operators/debounce.ts @@ -1,12 +1,12 @@ import { Operator } from '../Operator'; -import { Observable, SubscribableOrPromise } from '../Observable'; +import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; +import { Subscription } from '../Subscription'; +import { MonoTypeOperatorFunction, SubscribableOrPromise, TeardownLogic } from '../types'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; /** * Emits a value from the source Observable only after a particular time span diff --git a/src/internal/operators/debounceTime.ts b/src/internal/operators/debounceTime.ts index 75cb6ae32c..691f468b06 100644 --- a/src/internal/operators/debounceTime.ts +++ b/src/internal/operators/debounceTime.ts @@ -2,9 +2,9 @@ import { Operator } from '../Operator'; import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; import { IScheduler } from '../Scheduler'; -import { Subscription, TeardownLogic } from '../Subscription'; +import { Subscription } from '../Subscription'; import { async } from '../scheduler/async'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Emits a value from the source Observable only after a particular time span diff --git a/src/internal/operators/defaultIfEmpty.ts b/src/internal/operators/defaultIfEmpty.ts index b32459b202..3564cf06fb 100644 --- a/src/internal/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 '../../internal/types'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function defaultIfEmpty(defaultValue?: T): MonoTypeOperatorFunction; diff --git a/src/internal/operators/delay.ts b/src/internal/operators/delay.ts index c67978425b..63ad502610 100644 --- a/src/internal/operators/delay.ts +++ b/src/internal/operators/delay.ts @@ -1,14 +1,12 @@ import { async } from '../scheduler/async'; -import { isDate } from '..//util/isDate'; +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 '../../internal/types'; +import { MonoTypeOperatorFunction, PartialObserver, TeardownLogic } from '../types'; /** * Delays the emission of items from the source Observable by a given timeout or diff --git a/src/internal/operators/delayWhen.ts b/src/internal/operators/delayWhen.ts index 1bef9ace12..730d7cb9cf 100644 --- a/src/internal/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 { Subscription } from '../Subscription'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Delays the emission of items from the source Observable by a given time span diff --git a/src/internal/operators/dematerialize.ts b/src/internal/operators/dematerialize.ts index 6c51f92e3b..70951446e8 100644 --- a/src/internal/operators/dematerialize.ts +++ b/src/internal/operators/dematerialize.ts @@ -2,7 +2,7 @@ import { Operator } from '../Operator'; import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; import { Notification } from '../Notification'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction } from '../types'; /** * Converts an Observable of {@link Notification} objects into the emissions diff --git a/src/internal/operators/distinct.ts b/src/internal/operators/distinct.ts index 46d5c1f8f9..7f17518483 100644 --- a/src/internal/operators/distinct.ts +++ b/src/internal/operators/distinct.ts @@ -1,11 +1,10 @@ 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; if (!Set) { throw new Error('Set is not present, please polyfill'); diff --git a/src/internal/operators/distinctUntilChanged.ts b/src/internal/operators/distinctUntilChanged.ts index 9e19e7d206..913bb15479 100644 --- a/src/internal/operators/distinctUntilChanged.ts +++ b/src/internal/operators/distinctUntilChanged.ts @@ -1,10 +1,9 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; -import { tryCatch } from '..//util/tryCatch'; -import { errorObject } from '..//util/errorObject'; +import { tryCatch } from '../util/tryCatch'; +import { errorObject } from '../util/errorObject'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /* tslint:disable:max-line-length */ export function distinctUntilChanged(compare?: (x: T, y: T) => boolean): MonoTypeOperatorFunction; diff --git a/src/internal/operators/distinctUntilKeyChanged.ts b/src/internal/operators/distinctUntilKeyChanged.ts index eb8d7cf6f9..4f2ee68e3f 100644 --- a/src/internal/operators/distinctUntilKeyChanged.ts +++ b/src/internal/operators/distinctUntilKeyChanged.ts @@ -1,5 +1,5 @@ import { distinctUntilChanged } from './distinctUntilChanged'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function distinctUntilKeyChanged(key: string): MonoTypeOperatorFunction; diff --git a/src/internal/operators/elementAt.ts b/src/internal/operators/elementAt.ts index c2eac5afcf..680a976c45 100644 --- a/src/internal/operators/elementAt.ts +++ b/src/internal/operators/elementAt.ts @@ -1,9 +1,8 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; -import { ArgumentOutOfRangeError } from '..//util/ArgumentOutOfRangeError'; +import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Emits the single value at the specified `index` in a sequence of emissions diff --git a/src/internal/operators/every.ts b/src/internal/operators/every.ts index a02f265458..668564fe1d 100644 --- a/src/internal/operators/every.ts +++ b/src/internal/operators/every.ts @@ -1,8 +1,7 @@ import { Operator } from '../Operator'; -import { Observer } from '../Observer'; import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; -import { OperatorFunction } from '../../internal/types'; +import { Observer, OperatorFunction } from '../types'; /** * Returns an Observable that emits whether or not every item of the source satisfies the condition specified. diff --git a/src/internal/operators/exhaust.ts b/src/internal/operators/exhaust.ts index 6beea5cc3e..97a02c8771 100644 --- a/src/internal/operators/exhaust.ts +++ b/src/internal/operators/exhaust.ts @@ -1,10 +1,10 @@ import { Operator } from '../Operator'; -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; +import { Subscription } from '../Subscription'; import { OuterSubscriber } from '../OuterSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; -import { OperatorFunction } from '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { ObservableInput, OperatorFunction, TeardownLogic } from '../types'; export function exhaust(): OperatorFunction, T>; export function exhaust(): OperatorFunction; diff --git a/src/internal/operators/exhaustMap.ts b/src/internal/operators/exhaustMap.ts index 06aa697610..009bb8c47a 100644 --- a/src/internal/operators/exhaustMap.ts +++ b/src/internal/operators/exhaustMap.ts @@ -1,11 +1,11 @@ import { Operator } from '../Operator'; -import { Observable, ObservableInput } from '../Observable'; +import { Observable } 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { ObservableInput, OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function exhaustMap(project: (value: T, index: number) => ObservableInput): OperatorFunction; diff --git a/src/internal/operators/expand.ts b/src/internal/operators/expand.ts index ad4c22d7fb..aa58c37005 100644 --- a/src/internal/operators/expand.ts +++ b/src/internal/operators/expand.ts @@ -1,14 +1,14 @@ -import { Observable, ObservableInput } from '../Observable'; +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 { 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { MonoTypeOperatorFunction, OperatorFunction, ObservableInput } from '../types'; /* tslint:disable:max-line-length */ export function expand(project: (value: T, index: number) => ObservableInput, concurrent?: number, scheduler?: IScheduler): OperatorFunction; diff --git a/src/internal/operators/filter.ts b/src/internal/operators/filter.ts index 88f4f43235..e4072cfacf 100644 --- a/src/internal/operators/filter.ts +++ b/src/internal/operators/filter.ts @@ -1,8 +1,7 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../../internal/types'; +import { OperatorFunction, MonoTypeOperatorFunction, TeardownLogic } from '../types'; /* tslint:disable:max-line-length */ export function filter(predicate: (value: T, index: number) => value is S, diff --git a/src/internal/operators/finalize.ts b/src/internal/operators/finalize.ts index 806b2accc8..d19d6131b6 100644 --- a/src/internal/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 { Subscription } from '../Subscription'; import { Observable } from '../Observable'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Returns an Observable that mirrors the source Observable, but will call a specified function when diff --git a/src/internal/operators/find.ts b/src/internal/operators/find.ts index 18f66c916f..1cc26e09a7 100644 --- a/src/internal/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 '../../internal/types'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../types'; export function find(predicate: (value: T, index: number, source: Observable) => value is S, thisArg?: any): OperatorFunction; diff --git a/src/internal/operators/findIndex.ts b/src/internal/operators/findIndex.ts index 2016e81537..baf9444e38 100644 --- a/src/internal/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 '../../internal/types'; +import { OperatorFunction } from '../types'; /** * Emits only the index of the first value emitted by the source Observable that * meets some condition. diff --git a/src/internal/operators/first.ts b/src/internal/operators/first.ts index 354b9ec959..f7f7716489 100644 --- a/src/internal/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 '../../internal/types'; +import { EmptyError } from '../util/EmptyError'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../types'; /* 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/internal/operators/groupBy.ts b/src/internal/operators/groupBy.ts index af2fe3afbd..3830d1e736 100644 --- a/src/internal/operators/groupBy.ts +++ b/src/internal/operators/groupBy.ts @@ -3,7 +3,7 @@ import { Subscription } from '../Subscription'; import { Observable } from '../Observable'; import { Operator } from '../Operator'; import { Subject } from '../Subject'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction } from '../types'; /** Assert that map is present for this operator */ if (!Map) { diff --git a/src/internal/operators/ignoreElements.ts b/src/internal/operators/ignoreElements.ts index 9223d2046b..791a3407ad 100644 --- a/src/internal/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 '../../internal/types'; +import { MonoTypeOperatorFunction } from '../types'; /** * Ignores all items emitted by the source Observable and only passes calls of `complete` or `error`. diff --git a/src/internal/operators/isEmpty.ts b/src/internal/operators/isEmpty.ts index cc8a81ef6a..997a39db80 100644 --- a/src/internal/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 '../../internal/types'; +import { OperatorFunction } from '../types'; export function isEmpty(): OperatorFunction { return (source: Observable) => source.lift(new IsEmptyOperator()); diff --git a/src/internal/operators/last.ts b/src/internal/operators/last.ts index b62079326c..964ce6e3d3 100644 --- a/src/internal/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 '../../internal/types'; +import { EmptyError } from '../util/EmptyError'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function last(predicate: (value: T, index: number, source: Observable) => value is S): OperatorFunction; diff --git a/src/internal/operators/map.ts b/src/internal/operators/map.ts index 53ae037278..1fc8e8292b 100644 --- a/src/internal/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 '../../internal/types'; +import { OperatorFunction } from '../types'; /** * Applies a given `project` function to each value emitted by the source diff --git a/src/internal/operators/mapTo.ts b/src/internal/operators/mapTo.ts index df74f0a7f7..679083b5a3 100644 --- a/src/internal/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 '../../internal/types'; +import { OperatorFunction } from '../types'; /** * Emits the given constant value on the output Observable every time the source diff --git a/src/internal/operators/materialize.ts b/src/internal/operators/materialize.ts index bee11906ac..86066a87e2 100644 --- a/src/internal/operators/materialize.ts +++ b/src/internal/operators/materialize.ts @@ -2,7 +2,7 @@ import { Operator } from '../Operator'; import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; import { Notification } from '../Notification'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction } from '../types'; /** * Represents all of the notifications from the source Observable as `next` diff --git a/src/internal/operators/max.ts b/src/internal/operators/max.ts index 2bb1e15c05..d5f44ffceb 100644 --- a/src/internal/operators/max.ts +++ b/src/internal/operators/max.ts @@ -1,5 +1,5 @@ import { reduce } from './reduce'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction } from '../types'; /** * 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/operators/mergeAll.ts b/src/internal/operators/mergeAll.ts index 5d026564d7..328407eb83 100644 --- a/src/internal/operators/mergeAll.ts +++ b/src/internal/operators/mergeAll.ts @@ -1,8 +1,7 @@ -import { ObservableInput, Observable } from '../Observable'; import { mergeMap } from './mergeMap'; -import { identity } from '..//util/identity'; -import { OperatorFunction } from '../../internal/types'; +import { identity } from '../util/identity'; +import { OperatorFunction, ObservableInput } from '../types'; export function mergeAll(concurrent?: number): OperatorFunction, T>; export function mergeAll(concurrent?: number): OperatorFunction; diff --git a/src/internal/operators/mergeMap.ts b/src/internal/operators/mergeMap.ts index a4f1cddbcf..059a01e6c0 100644 --- a/src/internal/operators/mergeMap.ts +++ b/src/internal/operators/mergeMap.ts @@ -1,11 +1,11 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Subscription } from '../Subscription'; -import { subscribeToResult } from '..//util/subscribeToResult'; +import { subscribeToResult } from '../util/subscribeToResult'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { OperatorFunction } from '../../internal/types'; +import { ObservableInput, OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function mergeMap(project: (value: T, index: number) => ObservableInput, concurrent?: number): OperatorFunction; diff --git a/src/internal/operators/mergeMapTo.ts b/src/internal/operators/mergeMapTo.ts index 194b45bc81..a93fd3ca8d 100644 --- a/src/internal/operators/mergeMapTo.ts +++ b/src/internal/operators/mergeMapTo.ts @@ -1,12 +1,11 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { ObservableInput, OperatorFunction, PartialObserver } from '../types'; /* tslint:disable:max-line-length */ export function mergeMapTo(observable: ObservableInput, concurrent?: number): OperatorFunction; diff --git a/src/internal/operators/mergeScan.ts b/src/internal/operators/mergeScan.ts index 1451c9a0cc..b3e9072745 100644 --- a/src/internal/operators/mergeScan.ts +++ b/src/internal/operators/mergeScan.ts @@ -1,13 +1,13 @@ import { Operator } from '../Operator'; -import { Observable, ObservableInput } from '../Observable'; +import { Observable } 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 { 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 '../../internal/types'; +import { ObservableInput, OperatorFunction } from '../types'; /** * Applies an accumulator function over the source Observable where the diff --git a/src/internal/operators/min.ts b/src/internal/operators/min.ts index 6bebe56eeb..3b0a41024e 100644 --- a/src/internal/operators/min.ts +++ b/src/internal/operators/min.ts @@ -1,5 +1,5 @@ import { reduce } from './reduce'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction } from '../types'; /** * 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/operators/multicast.ts b/src/internal/operators/multicast.ts index ba5f20159d..f5431f569f 100644 --- a/src/internal/operators/multicast.ts +++ b/src/internal/operators/multicast.ts @@ -3,7 +3,7 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; import { ConnectableObservable, connectableObservableDescriptor } from '../observable/ConnectableObservable'; -import { FactoryOrValue, MonoTypeOperatorFunction, OperatorFunction, UnaryFunction } from '../../internal/types'; +import { FactoryOrValue, MonoTypeOperatorFunction, OperatorFunction, UnaryFunction } from '../types'; /* tslint:disable:max-line-length */ export function multicast(subjectOrSubjectFactory: FactoryOrValue>): UnaryFunction, ConnectableObservable>; diff --git a/src/internal/operators/observeOn.ts b/src/internal/operators/observeOn.ts index 92551d8433..cfef607f14 100644 --- a/src/internal/operators/observeOn.ts +++ b/src/internal/operators/observeOn.ts @@ -1,12 +1,10 @@ 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 '../../internal/types'; +import { MonoTypeOperatorFunction, PartialObserver, TeardownLogic } from '../types'; /** * diff --git a/src/internal/operators/onErrorResumeNext.ts b/src/internal/operators/onErrorResumeNext.ts index 7fac0317e4..d061796caf 100644 --- a/src/internal/operators/onErrorResumeNext.ts +++ b/src/internal/operators/onErrorResumeNext.ts @@ -1,12 +1,12 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; import { from } from '../observable/from'; import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; -import { isArray } from '..//util/isArray'; +import { isArray } from '../util/isArray'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; -import { OperatorFunction } from '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { ObservableInput, OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function onErrorResumeNext(v: ObservableInput): OperatorFunction; diff --git a/src/internal/operators/pairwise.ts b/src/internal/operators/pairwise.ts index a7efb0a512..6343058963 100644 --- a/src/internal/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 '../../internal/types'; +import { OperatorFunction } from '../types'; /** * Groups pairs of consecutive emissions together and emits them as an array of diff --git a/src/internal/operators/partition.ts b/src/internal/operators/partition.ts index d10e171043..d8ddd27066 100644 --- a/src/internal/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 '../../internal/types'; +import { UnaryFunction } from '../types'; /** * Splits the source Observable into two, one with values that satisfy a diff --git a/src/internal/operators/pluck.ts b/src/internal/operators/pluck.ts index 13e3421cbd..587ac34a4f 100644 --- a/src/internal/operators/pluck.ts +++ b/src/internal/operators/pluck.ts @@ -1,6 +1,6 @@ import { Observable } from '../Observable'; import { map } from './map'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction } from '../types'; /** * Maps each source value (an object) to its specified nested property. diff --git a/src/internal/operators/publish.ts b/src/internal/operators/publish.ts index b727666818..a37044b3f1 100644 --- a/src/internal/operators/publish.ts +++ b/src/internal/operators/publish.ts @@ -2,7 +2,7 @@ import { Observable } from '../Observable'; import { Subject } from '../Subject'; import { multicast } from './multicast'; import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { MonoTypeOperatorFunction, OperatorFunction, UnaryFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, OperatorFunction, UnaryFunction } from '../types'; /* tslint:disable:max-line-length */ export function publish(): UnaryFunction, ConnectableObservable>; diff --git a/src/internal/operators/publishBehavior.ts b/src/internal/operators/publishBehavior.ts index 13ac7f9d16..792b3151d0 100644 --- a/src/internal/operators/publishBehavior.ts +++ b/src/internal/operators/publishBehavior.ts @@ -2,7 +2,7 @@ import { Observable } from '../Observable'; import { BehaviorSubject } from '../BehaviorSubject'; import { multicast } from './multicast'; import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { UnaryFunction } from '../../internal/types'; +import { UnaryFunction } from '../types'; /** * @param value diff --git a/src/internal/operators/publishLast.ts b/src/internal/operators/publishLast.ts index a7c66d25f1..cc628a1db3 100644 --- a/src/internal/operators/publishLast.ts +++ b/src/internal/operators/publishLast.ts @@ -2,7 +2,7 @@ import { Observable } from '../Observable'; import { AsyncSubject } from '../AsyncSubject'; import { multicast } from './multicast'; import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { UnaryFunction } from '../../internal/types'; +import { UnaryFunction } from '../types'; export function publishLast(): UnaryFunction, ConnectableObservable> { return (source: Observable) => multicast(new AsyncSubject())(source); diff --git a/src/internal/operators/publishReplay.ts b/src/internal/operators/publishReplay.ts index d81a33bb1c..0361fa367e 100644 --- a/src/internal/operators/publishReplay.ts +++ b/src/internal/operators/publishReplay.ts @@ -3,7 +3,7 @@ import { ReplaySubject } from '../ReplaySubject'; import { IScheduler } from '../Scheduler'; import { multicast } from './multicast'; import { ConnectableObservable } from '../observable/ConnectableObservable'; -import { UnaryFunction, MonoTypeOperatorFunction, OperatorFunction } from '../../internal/types'; +import { UnaryFunction, MonoTypeOperatorFunction, OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function publishReplay(bufferSize?: number, windowTime?: number, scheduler?: IScheduler): UnaryFunction, ConnectableObservable>; diff --git a/src/internal/operators/race.ts b/src/internal/operators/race.ts index f98d5dc99a..ca55ea90ba 100644 --- a/src/internal/operators/race.ts +++ b/src/internal/operators/race.ts @@ -1,6 +1,6 @@ import { Observable } from '../Observable'; -import { isArray } from '..//util/isArray'; -import { MonoTypeOperatorFunction, OperatorFunction } from '../../internal/types'; +import { isArray } from '../util/isArray'; +import { MonoTypeOperatorFunction, OperatorFunction } from '../types'; import { race as raceStatic } from '../observable/race'; /* tslint:disable:max-line-length */ diff --git a/src/internal/operators/reduce.ts b/src/internal/operators/reduce.ts index 4c483711cc..9067fd5291 100644 --- a/src/internal/operators/reduce.ts +++ b/src/internal/operators/reduce.ts @@ -2,8 +2,8 @@ import { Observable } from '../Observable'; import { scan } from './scan'; import { takeLast } from './takeLast'; import { defaultIfEmpty } from './defaultIfEmpty'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../../internal/types'; -import { pipe } from '..//util/pipe'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../types'; +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/internal/operators/refCount.ts b/src/internal/operators/refCount.ts index eb8ecd7a02..13493bc1fa 100644 --- a/src/internal/operators/refCount.ts +++ b/src/internal/operators/refCount.ts @@ -1,7 +1,7 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { Subscription } from '../Subscription'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; import { ConnectableObservable } from '../observable/ConnectableObservable'; import { Observable } from '../Observable'; diff --git a/src/internal/operators/repeat.ts b/src/internal/operators/repeat.ts index 9b5ca35e1a..287be6724e 100644 --- a/src/internal/operators/repeat.ts +++ b/src/internal/operators/repeat.ts @@ -2,8 +2,7 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; import { empty } from '../observable/empty'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Returns an Observable that repeats the stream of items emitted by the source Observable at most count times. diff --git a/src/internal/operators/repeatWhen.ts b/src/internal/operators/repeatWhen.ts index f66a41e8e9..5618d60da9 100644 --- a/src/internal/operators/repeatWhen.ts +++ b/src/internal/operators/repeatWhen.ts @@ -2,15 +2,15 @@ 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 { 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 { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Returns an Observable that mirrors the source Observable with the exception of a `complete`. If the source diff --git a/src/internal/operators/retry.ts b/src/internal/operators/retry.ts index c70f60f949..a47fbff964 100644 --- a/src/internal/operators/retry.ts +++ b/src/internal/operators/retry.ts @@ -1,9 +1,8 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable diff --git a/src/internal/operators/retryWhen.ts b/src/internal/operators/retryWhen.ts index 46169fcbba..d6b5de5e9d 100644 --- a/src/internal/operators/retryWhen.ts +++ b/src/internal/operators/retryWhen.ts @@ -2,15 +2,15 @@ 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 { 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 { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Returns an Observable that mirrors the source Observable with the exception of an `error`. If the source Observable diff --git a/src/internal/operators/sample.ts b/src/internal/operators/sample.ts index 8f08062673..c763c4eafe 100644 --- a/src/internal/operators/sample.ts +++ b/src/internal/operators/sample.ts @@ -1,12 +1,11 @@ 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 { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Emits the most recently emitted value from the source Observable whenever diff --git a/src/internal/operators/sampleTime.ts b/src/internal/operators/sampleTime.ts index d526bcee16..ae5b712603 100644 --- a/src/internal/operators/sampleTime.ts +++ b/src/internal/operators/sampleTime.ts @@ -4,9 +4,7 @@ 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 '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Emits the most recently emitted value from the source Observable within diff --git a/src/internal/operators/scan.ts b/src/internal/operators/scan.ts index 0cf999e622..a8ad391a10 100644 --- a/src/internal/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 '../../internal/types'; +import { OperatorFunction, MonoTypeOperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function scan(accumulator: (acc: T, value: T, index: number) => T, seed?: T): MonoTypeOperatorFunction; diff --git a/src/internal/operators/sequenceEqual.ts b/src/internal/operators/sequenceEqual.ts index 72b166eb10..b48f42a83e 100644 --- a/src/internal/operators/sequenceEqual.ts +++ b/src/internal/operators/sequenceEqual.ts @@ -1,11 +1,10 @@ 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 { tryCatch } from '../util/tryCatch'; +import { errorObject } from '../util/errorObject'; -import { OperatorFunction } from '../../internal/types'; +import { Observer, OperatorFunction } from '../types'; /** * Compares all values of two observables in sequence using an optional comparor function diff --git a/src/internal/operators/share.ts b/src/internal/operators/share.ts index 2664593ae8..7339748221 100644 --- a/src/internal/operators/share.ts +++ b/src/internal/operators/share.ts @@ -3,7 +3,7 @@ import { multicast } from './multicast'; import { refCount } from './refCount'; import { Subject } from '../Subject'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction } from '../types'; function shareSubjectFactory() { return new Subject(); diff --git a/src/internal/operators/shareReplay.ts b/src/internal/operators/shareReplay.ts index 7a4ac639fc..6a5c25ddd9 100644 --- a/src/internal/operators/shareReplay.ts +++ b/src/internal/operators/shareReplay.ts @@ -2,7 +2,7 @@ import { Observable } from '../Observable'; import { ReplaySubject } from '../ReplaySubject'; import { IScheduler } from '../Scheduler'; import { Subscription } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction } from '../types'; import { Subscriber } from '../Subscriber'; /** diff --git a/src/internal/operators/single.ts b/src/internal/operators/single.ts index 121191803c..cff597c8b1 100644 --- a/src/internal/operators/single.ts +++ b/src/internal/operators/single.ts @@ -1,11 +1,9 @@ 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 { EmptyError } from '../util/EmptyError'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { Observer, MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Returns an Observable that emits the single item emitted by the source Observable that matches a specified diff --git a/src/internal/operators/skip.ts b/src/internal/operators/skip.ts index 7fdd86f06a..34483845e2 100644 --- a/src/internal/operators/skip.ts +++ b/src/internal/operators/skip.ts @@ -1,8 +1,7 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Returns an Observable that skips the first `count` items emitted by the source Observable. diff --git a/src/internal/operators/skipLast.ts b/src/internal/operators/skipLast.ts index f749d84689..36503e4ab2 100644 --- a/src/internal/operators/skipLast.ts +++ b/src/internal/operators/skipLast.ts @@ -1,9 +1,8 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; -import { ArgumentOutOfRangeError } from '..//util/ArgumentOutOfRangeError'; +import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Skip the last `count` values emitted by the source Observable. diff --git a/src/internal/operators/skipUntil.ts b/src/internal/operators/skipUntil.ts index 34d433f82c..ced640f9fe 100644 --- a/src/internal/operators/skipUntil.ts +++ b/src/internal/operators/skipUntil.ts @@ -1,11 +1,10 @@ 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Returns an Observable that skips items emitted by the source Observable until a second Observable emits an item. diff --git a/src/internal/operators/skipWhile.ts b/src/internal/operators/skipWhile.ts index fb1cd1b688..6ffd7d26aa 100644 --- a/src/internal/operators/skipWhile.ts +++ b/src/internal/operators/skipWhile.ts @@ -1,8 +1,7 @@ import { Observable } from '../Observable'; import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Returns an Observable that skips all items emitted by the source Observable as long as a specified condition holds diff --git a/src/internal/operators/startWith.ts b/src/internal/operators/startWith.ts index c7885bc327..f749301890 100644 --- a/src/internal/operators/startWith.ts +++ b/src/internal/operators/startWith.ts @@ -4,8 +4,8 @@ import { fromArray } from '../observable/fromArray'; import { scalar } from '../observable/scalar'; import { empty } from '../observable/empty'; import { concat as concatStatic } from '../observable/concat'; -import { isScheduler } from '..//util/isScheduler'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { isScheduler } from '../util/isScheduler'; +import { MonoTypeOperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function startWith(v1: T, scheduler?: IScheduler): MonoTypeOperatorFunction; diff --git a/src/internal/operators/subscribeOn.ts b/src/internal/operators/subscribeOn.ts index 7d3482229b..9c200ba98e 100644 --- a/src/internal/operators/subscribeOn.ts +++ b/src/internal/operators/subscribeOn.ts @@ -2,9 +2,8 @@ import { Operator } from '../Operator'; import { IScheduler } from '../Scheduler'; import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; import { SubscribeOnObservable } from '../observable/SubscribeOnObservable'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Asynchronously subscribes Observers to this Observable on the specified IScheduler. diff --git a/src/internal/operators/switchAll.ts b/src/internal/operators/switchAll.ts index 3d1e5ae192..9caa9f10e3 100644 --- a/src/internal/operators/switchAll.ts +++ b/src/internal/operators/switchAll.ts @@ -1,7 +1,6 @@ -import { OperatorFunction } from '../../internal/types'; -import { ObservableInput } from '../Observable'; +import { OperatorFunction, ObservableInput } from '../types'; import { switchMap } from './switchMap'; -import { identity } from '..//util/identity'; +import { identity } from '../util/identity'; export function switchAll(): OperatorFunction, T>; export function switchAll(): OperatorFunction; diff --git a/src/internal/operators/switchMap.ts b/src/internal/operators/switchMap.ts index 7b5a33a520..0aef36f0b6 100644 --- a/src/internal/operators/switchMap.ts +++ b/src/internal/operators/switchMap.ts @@ -1,11 +1,11 @@ import { Operator } from '../Operator'; -import { Observable, ObservableInput } from '../Observable'; +import { Observable } 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { ObservableInput, OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function switchMap(project: (value: T, index: number) => ObservableInput): OperatorFunction; diff --git a/src/internal/operators/switchMapTo.ts b/src/internal/operators/switchMapTo.ts index 836018fb6a..5d8d221fb7 100644 --- a/src/internal/operators/switchMapTo.ts +++ b/src/internal/operators/switchMapTo.ts @@ -1,11 +1,11 @@ import { Operator } from '../Operator'; -import { Observable, ObservableInput } from '../Observable'; +import { Observable } 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { ObservableInput, OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function switchMapTo(observable: ObservableInput): OperatorFunction; diff --git a/src/internal/operators/take.ts b/src/internal/operators/take.ts index 842e6a68f3..8b3c69e8ea 100644 --- a/src/internal/operators/take.ts +++ b/src/internal/operators/take.ts @@ -1,10 +1,9 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; -import { ArgumentOutOfRangeError } from '..//util/ArgumentOutOfRangeError'; +import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; import { empty } from '../observable/empty'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Emits only the first `count` values emitted by the source Observable. diff --git a/src/internal/operators/takeLast.ts b/src/internal/operators/takeLast.ts index 9a053f38bd..0138249043 100644 --- a/src/internal/operators/takeLast.ts +++ b/src/internal/operators/takeLast.ts @@ -1,10 +1,9 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; -import { ArgumentOutOfRangeError } from '..//util/ArgumentOutOfRangeError'; +import { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError'; import { empty } from '../observable/empty'; import { Observable } from '../Observable'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Emits only the last `count` values emitted by the source Observable. diff --git a/src/internal/operators/takeUntil.ts b/src/internal/operators/takeUntil.ts index 0066238344..9f70687d0e 100644 --- a/src/internal/operators/takeUntil.ts +++ b/src/internal/operators/takeUntil.ts @@ -1,13 +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 { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Emits the values emitted by the source Observable until a `notifier` diff --git a/src/internal/operators/takeWhile.ts b/src/internal/operators/takeWhile.ts index e3b13ebf6e..7599ecd6ab 100644 --- a/src/internal/operators/takeWhile.ts +++ b/src/internal/operators/takeWhile.ts @@ -1,8 +1,7 @@ import { Operator } from '../Operator'; import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Emits values emitted by the source Observable so long as each value satisfies diff --git a/src/internal/operators/tap.ts b/src/internal/operators/tap.ts index 491e37f8e9..6c12f0e750 100644 --- a/src/internal/operators/tap.ts +++ b/src/internal/operators/tap.ts @@ -1,11 +1,9 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; -import { PartialObserver } from '../Observer'; -import { TeardownLogic } from '../Subscription'; -import { MonoTypeOperatorFunction } from '../../internal/types'; -import { noop } from '..//util/noop'; -import { isFunction } from '..//util/isFunction'; +import { MonoTypeOperatorFunction, PartialObserver, TeardownLogic } from '../types'; +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/internal/operators/throttle.ts b/src/internal/operators/throttle.ts index 7e620baaba..4b1d50e95e 100644 --- a/src/internal/operators/throttle.ts +++ b/src/internal/operators/throttle.ts @@ -1,13 +1,13 @@ import { Operator } from '../Operator'; -import { Observable, SubscribableOrPromise } from '../Observable'; +import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; -import { Subscription, TeardownLogic } from '../Subscription'; +import { Subscription } from '../Subscription'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; +import { subscribeToResult } from '../util/subscribeToResult'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, SubscribableOrPromise, TeardownLogic } from '../types'; export interface ThrottleConfig { leading?: boolean; diff --git a/src/internal/operators/throttleTime.ts b/src/internal/operators/throttleTime.ts index bb325d54fa..ccc2d706fe 100644 --- a/src/internal/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 { Subscription } from '../Subscription'; import { async } from '../scheduler/async'; import { Observable } from '../Observable'; import { ThrottleConfig, defaultThrottleConfig } from './throttle'; -import { MonoTypeOperatorFunction } from '../../internal/types'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * Emits a value from the source Observable, then ignores subsequent source diff --git a/src/internal/operators/timeInterval.ts b/src/internal/operators/timeInterval.ts index fdcbf2b94d..891f2851a9 100644 --- a/src/internal/operators/timeInterval.ts +++ b/src/internal/operators/timeInterval.ts @@ -3,7 +3,7 @@ import { Observable } from '../Observable'; import { Subscriber } from '../Subscriber'; import { IScheduler } from '../Scheduler'; import { async } from '../scheduler/async'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction } from '../types'; export function timeInterval(scheduler: IScheduler = async): OperatorFunction> { return (source: Observable) => source.lift(new TimeIntervalOperator(scheduler)); diff --git a/src/internal/operators/timeout.ts b/src/internal/operators/timeout.ts index ac52d03910..61492b7d2a 100644 --- a/src/internal/operators/timeout.ts +++ b/src/internal/operators/timeout.ts @@ -1,13 +1,12 @@ import { Action } from '../scheduler/Action'; import { async } from '../scheduler/async'; -import { isDate } from '..//util/isDate'; +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 '../../internal/types'; +import { TimeoutError } from '../util/TimeoutError'; +import { MonoTypeOperatorFunction, TeardownLogic } from '../types'; /** * diff --git a/src/internal/operators/timeoutWith.ts b/src/internal/operators/timeoutWith.ts index 07df3ed19b..b69e85deae 100644 --- a/src/internal/operators/timeoutWith.ts +++ b/src/internal/operators/timeoutWith.ts @@ -3,12 +3,11 @@ 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 { Observable } from '../Observable'; +import { isDate } from '../util/isDate'; import { OuterSubscriber } from '../OuterSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; -import { OperatorFunction, MonoTypeOperatorFunction } from '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { ObservableInput, OperatorFunction, MonoTypeOperatorFunction, TeardownLogic } from '../types'; /* tslint:disable:max-line-length */ export function timeoutWith(due: number | Date, withObservable: ObservableInput, scheduler?: IScheduler): MonoTypeOperatorFunction; diff --git a/src/internal/operators/timestamp.ts b/src/internal/operators/timestamp.ts index 04f0e83b48..f8c83f729a 100644 --- a/src/internal/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 '../../internal/types'; +import { OperatorFunction } from '../types'; import { map } from './map'; /** diff --git a/src/internal/operators/toArray.ts b/src/internal/operators/toArray.ts index 4f81990eb1..160da34202 100644 --- a/src/internal/operators/toArray.ts +++ b/src/internal/operators/toArray.ts @@ -1,5 +1,5 @@ import { reduce } from './reduce'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction } from '../types'; function toArrayReducer(arr: T[], item: T, index: number) { if (index === 0) { diff --git a/src/internal/operators/window.ts b/src/internal/operators/window.ts index 0cb6887df3..9da0851085 100644 --- a/src/internal/operators/window.ts +++ b/src/internal/operators/window.ts @@ -1,10 +1,10 @@ import { Observable } from '../Observable'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction } from '../types'; import { Subject } from '../Subject'; import { Subscriber } from '../Subscriber'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; +import { subscribeToResult } from '../util/subscribeToResult'; import { Operator } from '../Operator'; /** diff --git a/src/internal/operators/windowCount.ts b/src/internal/operators/windowCount.ts index 333004f119..816bb167ae 100644 --- a/src/internal/operators/windowCount.ts +++ b/src/internal/operators/windowCount.ts @@ -2,7 +2,7 @@ import { Operator } from '../Operator'; import { Subscriber } from '../Subscriber'; import { Observable } from '../Observable'; import { Subject } from '../Subject'; -import { OperatorFunction } from '../../internal/types'; +import { OperatorFunction } from '../types'; /** * Branch out the source Observable values as a nested Observable with each diff --git a/src/internal/operators/windowTime.ts b/src/internal/operators/windowTime.ts index 9ad659066b..5e66851252 100644 --- a/src/internal/operators/windowTime.ts +++ b/src/internal/operators/windowTime.ts @@ -6,9 +6,9 @@ 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 '../../internal/types'; +import { isNumeric } from '../util/isNumeric'; +import { isScheduler } from '../util/isScheduler'; +import { OperatorFunction } from '../types'; /** * Branch out the source Observable values as a nested Observable periodically diff --git a/src/internal/operators/windowToggle.ts b/src/internal/operators/windowToggle.ts index 49f9fd1d73..c3543c479e 100644 --- a/src/internal/operators/windowToggle.ts +++ b/src/internal/operators/windowToggle.ts @@ -3,12 +3,12 @@ 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 { 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { OperatorFunction } from '../types'; /** * Branch out the source Observable values as a nested Observable starting from diff --git a/src/internal/operators/windowWhen.ts b/src/internal/operators/windowWhen.ts index eb44b883bf..03d6086985 100644 --- a/src/internal/operators/windowWhen.ts +++ b/src/internal/operators/windowWhen.ts @@ -3,12 +3,12 @@ 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 { 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 '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { OperatorFunction } from '../types'; /** * Branch out the source Observable values as a nested Observable using a diff --git a/src/internal/operators/withLatestFrom.ts b/src/internal/operators/withLatestFrom.ts index 0f857c7de9..b72c1754bb 100644 --- a/src/internal/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 { Observable } from '../Observable'; import { OuterSubscriber } from '../OuterSubscriber'; import { InnerSubscriber } from '../InnerSubscriber'; -import { subscribeToResult } from '..//util/subscribeToResult'; -import { OperatorFunction } from '../../internal/types'; +import { subscribeToResult } from '../util/subscribeToResult'; +import { ObservableInput, OperatorFunction } from '../types'; /* tslint:disable:max-line-length */ export function withLatestFrom(project: (v1: T) => R): OperatorFunction; diff --git a/src/internal/operators/zipAll.ts b/src/internal/operators/zipAll.ts index 290a07160e..163ae43a85 100644 --- a/src/internal/operators/zipAll.ts +++ b/src/internal/operators/zipAll.ts @@ -1,6 +1,6 @@ import { ZipOperator } from '../observable/zip'; -import { Observable, ObservableInput } from '../Observable'; -import { OperatorFunction } from '../../internal/types'; +import { Observable } from '../Observable'; +import { OperatorFunction, ObservableInput } from '../types'; export function zipAll(): OperatorFunction, T[]>; export function zipAll(): OperatorFunction; diff --git a/src/internal/patching/operator/audit.ts b/src/internal/patching/operator/audit.ts index 92f228f3aa..ef4599b6fc 100644 --- a/src/internal/patching/operator/audit.ts +++ b/src/internal/patching/operator/audit.ts @@ -1,5 +1,6 @@ -import { Observable, SubscribableOrPromise } from '../../Observable'; +import { Observable } from '../../Observable'; +import { SubscribableOrPromise } from '../../types'; import { audit as higherOrder } from '../../operators/audit'; /** diff --git a/src/internal/patching/operator/bufferToggle.ts b/src/internal/patching/operator/bufferToggle.ts index 563e2b4bb8..9d9d7e0d5a 100644 --- a/src/internal/patching/operator/bufferToggle.ts +++ b/src/internal/patching/operator/bufferToggle.ts @@ -1,5 +1,6 @@ -import { Observable, SubscribableOrPromise } from '../../Observable'; +import { Observable } from '../../Observable'; +import { SubscribableOrPromise } from '../../types'; import { bufferToggle as higherOrder } from '../../operators/bufferToggle'; /** diff --git a/src/internal/patching/operator/catch.ts b/src/internal/patching/operator/catch.ts index de2ffe20d7..1a421caadf 100644 --- a/src/internal/patching/operator/catch.ts +++ b/src/internal/patching/operator/catch.ts @@ -1,5 +1,6 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { catchError as higherOrder } from '../../operators/catchError'; /** diff --git a/src/internal/patching/operator/combineAll.ts b/src/internal/patching/operator/combineAll.ts index bdb65b1bde..214d7b599f 100644 --- a/src/internal/patching/operator/combineAll.ts +++ b/src/internal/patching/operator/combineAll.ts @@ -1,6 +1,7 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; import { combineAll as higherOrder } from '../../operators/combineAll'; +import { ObservableInput } from '../../types'; export function combineAll(this: Observable>): Observable; export function combineAll(this: Observable): Observable; diff --git a/src/internal/patching/operator/combineLatest.ts b/src/internal/patching/operator/combineLatest.ts index 84e5471c6c..9241ebfe25 100644 --- a/src/internal/patching/operator/combineLatest.ts +++ b/src/internal/patching/operator/combineLatest.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { CombineLatestOperator } from '../../observable/combineLatest'; import { of } from '../../observable/of'; import { isArray } from '../..//util/isArray'; diff --git a/src/internal/patching/operator/concat.ts b/src/internal/patching/operator/concat.ts index 115d88072d..39a15597c1 100644 --- a/src/internal/patching/operator/concat.ts +++ b/src/internal/patching/operator/concat.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { IScheduler } from '../../Scheduler'; import { concat as concatStatic } from '../../observable/concat'; diff --git a/src/internal/patching/operator/concatAll.ts b/src/internal/patching/operator/concatAll.ts index bc1a89a950..b70f95244b 100644 --- a/src/internal/patching/operator/concatAll.ts +++ b/src/internal/patching/operator/concatAll.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { concatAll as higherOrder } from '../../operators/concatAll'; export function concatAll(this: Observable>): Observable; diff --git a/src/internal/patching/operator/concatMap.ts b/src/internal/patching/operator/concatMap.ts index efb6bdf387..da5813b450 100644 --- a/src/internal/patching/operator/concatMap.ts +++ b/src/internal/patching/operator/concatMap.ts @@ -1,5 +1,6 @@ import { concatMap as higherOrderConcatMap } from '../../operators/concatMap'; -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; /* tslint:disable:max-line-length */ export function concatMap(this: Observable, project: (value: T, index: number) => ObservableInput): Observable; diff --git a/src/internal/patching/operator/concatMapTo.ts b/src/internal/patching/operator/concatMapTo.ts index 53505b363a..61d3a19223 100644 --- a/src/internal/patching/operator/concatMapTo.ts +++ b/src/internal/patching/operator/concatMapTo.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { concatMapTo as higherOrder } from '../../operators/concatMapTo'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/debounce.ts b/src/internal/patching/operator/debounce.ts index f7397c1d19..0cabcb9882 100644 --- a/src/internal/patching/operator/debounce.ts +++ b/src/internal/patching/operator/debounce.ts @@ -1,5 +1,6 @@ -import { Observable, SubscribableOrPromise } from '../../Observable'; +import { Observable } from '../../Observable'; +import { SubscribableOrPromise } from '../../types'; import { debounce as higherOrder } from '../../operators/debounce'; /** diff --git a/src/internal/patching/operator/do.ts b/src/internal/patching/operator/do.ts index 1d897841cc..2ed3ab54b7 100644 --- a/src/internal/patching/operator/do.ts +++ b/src/internal/patching/operator/do.ts @@ -1,6 +1,6 @@ import { Observable } from '../../Observable'; -import { PartialObserver } from '../../Observer'; +import { PartialObserver } from '../../types'; import { tap as higherOrder } from '../../operators/tap'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/exhaust.ts b/src/internal/patching/operator/exhaust.ts index c160c2febf..181f89c081 100644 --- a/src/internal/patching/operator/exhaust.ts +++ b/src/internal/patching/operator/exhaust.ts @@ -1,6 +1,7 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; import { exhaust as higherOrder } from '../../operators/exhaust'; +import { ObservableInput } from '../../types'; export function exhaust(this: Observable>): Observable; export function exhaust(this: Observable): Observable; diff --git a/src/internal/patching/operator/exhaustMap.ts b/src/internal/patching/operator/exhaustMap.ts index c63a20c704..c753f3d891 100644 --- a/src/internal/patching/operator/exhaustMap.ts +++ b/src/internal/patching/operator/exhaustMap.ts @@ -1,5 +1,6 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { exhaustMap as higherOrder } from '../../operators/exhaustMap'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/expand.ts b/src/internal/patching/operator/expand.ts index f4dfc90c3a..3682ada576 100644 --- a/src/internal/patching/operator/expand.ts +++ b/src/internal/patching/operator/expand.ts @@ -1,6 +1,7 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; import { IScheduler } from '../../Scheduler'; import { expand as higherOrder } from '../../operators/expand'; +import { ObservableInput } from '../../types'; /* tslint:disable:max-line-length */ export function expand(this: Observable, project: (value: T, index: number) => ObservableInput, concurrent?: number, scheduler?: IScheduler): Observable; diff --git a/src/internal/patching/operator/merge.ts b/src/internal/patching/operator/merge.ts index 10fee5bce4..489fa69a1b 100644 --- a/src/internal/patching/operator/merge.ts +++ b/src/internal/patching/operator/merge.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { IScheduler } from '../../Scheduler'; import { merge as mergeStatic } from '../../observable/merge'; diff --git a/src/internal/patching/operator/mergeAll.ts b/src/internal/patching/operator/mergeAll.ts index 50b27127ed..bd5a3f4240 100644 --- a/src/internal/patching/operator/mergeAll.ts +++ b/src/internal/patching/operator/mergeAll.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { mergeAll as higherOrder } from '../../operators/mergeAll'; export function mergeAll(this: Observable>, concurrent?: number): Observable; diff --git a/src/internal/patching/operator/mergeMap.ts b/src/internal/patching/operator/mergeMap.ts index 9cbaeee390..0eac740955 100644 --- a/src/internal/patching/operator/mergeMap.ts +++ b/src/internal/patching/operator/mergeMap.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { mergeMap as higherOrderMergeMap } from '../../operators/mergeMap'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/mergeMapTo.ts b/src/internal/patching/operator/mergeMapTo.ts index 329d45a7d5..6b8b7d7d6b 100644 --- a/src/internal/patching/operator/mergeMapTo.ts +++ b/src/internal/patching/operator/mergeMapTo.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { mergeMapTo as higherOrder } from '../../operators/mergeMapTo'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/mergeScan.ts b/src/internal/patching/operator/mergeScan.ts index cd879e26b9..bad1a6d14f 100644 --- a/src/internal/patching/operator/mergeScan.ts +++ b/src/internal/patching/operator/mergeScan.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { mergeScan as higherOrder } from '../../operators/mergeScan'; /** diff --git a/src/internal/patching/operator/onErrorResumeNext.ts b/src/internal/patching/operator/onErrorResumeNext.ts index cc296beb59..340713f5bf 100644 --- a/src/internal/patching/operator/onErrorResumeNext.ts +++ b/src/internal/patching/operator/onErrorResumeNext.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { onErrorResumeNext as higherOrder } from '../../operators/onErrorResumeNext'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/switch.ts b/src/internal/patching/operator/switch.ts index 429ebd218c..688bf798d6 100644 --- a/src/internal/patching/operator/switch.ts +++ b/src/internal/patching/operator/switch.ts @@ -1,5 +1,6 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; import { switchAll as higherOrder } from '../../operators/switchAll'; +import { ObservableInput } from '../../types'; export function _switch(this: Observable>): Observable; export function _switch(this: Observable): Observable; diff --git a/src/internal/patching/operator/switchMap.ts b/src/internal/patching/operator/switchMap.ts index 7379dc0831..ae5c42aaba 100644 --- a/src/internal/patching/operator/switchMap.ts +++ b/src/internal/patching/operator/switchMap.ts @@ -1,5 +1,6 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { switchMap as higherOrderSwitchMap } from '../../operators/switchMap'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/switchMapTo.ts b/src/internal/patching/operator/switchMapTo.ts index 56749e3c10..1533492e1c 100644 --- a/src/internal/patching/operator/switchMapTo.ts +++ b/src/internal/patching/operator/switchMapTo.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { switchMapTo as higherOrder } from '../../operators/switchMapTo'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/throttle.ts b/src/internal/patching/operator/throttle.ts index c2b2a77c1b..eafd3d264e 100644 --- a/src/internal/patching/operator/throttle.ts +++ b/src/internal/patching/operator/throttle.ts @@ -1,4 +1,5 @@ -import { Observable, SubscribableOrPromise } from '../../Observable'; +import { Observable } from '../../Observable'; +import { SubscribableOrPromise } from '../../types'; import { throttle as higherOrder, ThrottleConfig, defaultThrottleConfig } from '../../operators/throttle'; /** diff --git a/src/internal/patching/operator/timeoutWith.ts b/src/internal/patching/operator/timeoutWith.ts index 74b4f05d66..46f8c42b36 100644 --- a/src/internal/patching/operator/timeoutWith.ts +++ b/src/internal/patching/operator/timeoutWith.ts @@ -1,6 +1,7 @@ import { IScheduler } from '../../Scheduler'; import { async } from '../../scheduler/async'; -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { timeoutWith as higherOrder } from '../../operators/timeoutWith'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/timestamp.ts b/src/internal/patching/operator/timestamp.ts index 8ee775a06e..dec0092cd0 100644 --- a/src/internal/patching/operator/timestamp.ts +++ b/src/internal/patching/operator/timestamp.ts @@ -1,8 +1,7 @@ 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, Timestamp } from '../../operators/timestamp'; /** * @param scheduler * @return {Observable>|WebSocketSubject|Observable} diff --git a/src/internal/patching/operator/withLatestFrom.ts b/src/internal/patching/operator/withLatestFrom.ts index dacc9fff3c..65f2c4e9a6 100644 --- a/src/internal/patching/operator/withLatestFrom.ts +++ b/src/internal/patching/operator/withLatestFrom.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { withLatestFrom as higherOrder } from '../../operators/withLatestFrom'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/zip.ts b/src/internal/patching/operator/zip.ts index 602e3ce46f..a4a0c87d1d 100644 --- a/src/internal/patching/operator/zip.ts +++ b/src/internal/patching/operator/zip.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; +import { ObservableInput } from '../../types'; import { zip as zipStatic } from '../../observable/zip'; /* tslint:disable:max-line-length */ diff --git a/src/internal/patching/operator/zipAll.ts b/src/internal/patching/operator/zipAll.ts index 2ad7bed2b2..da0daa0799 100644 --- a/src/internal/patching/operator/zipAll.ts +++ b/src/internal/patching/operator/zipAll.ts @@ -1,5 +1,6 @@ -import { Observable, ObservableInput } from '../../Observable'; +import { Observable } from '../../Observable'; import { zipAll as higherOrder } from '../../operators/zipAll'; +import { ObservableInput } from '../../types'; export function zipAll(this: Observable>): Observable; export function zipAll(this: Observable): Observable; diff --git a/src/internal/scheduler/AnimationFrameAction.ts b/src/internal/scheduler/AnimationFrameAction.ts index 67664d9f96..d32622f2c4 100644 --- a/src/internal/scheduler/AnimationFrameAction.ts +++ b/src/internal/scheduler/AnimationFrameAction.ts @@ -1,5 +1,5 @@ import { AsyncAction } from './AsyncAction'; -import { AnimationFrame } from '..//util/AnimationFrame'; +import { AnimationFrame } from '../util/AnimationFrame'; import { AnimationFrameScheduler } from './AnimationFrameScheduler'; import { Action } from './Action'; diff --git a/src/internal/scheduler/AsapAction.ts b/src/internal/scheduler/AsapAction.ts index 50497b0110..e2ce56ffea 100644 --- a/src/internal/scheduler/AsapAction.ts +++ b/src/internal/scheduler/AsapAction.ts @@ -1,4 +1,4 @@ -import { Immediate } from '..//util/Immediate'; +import { Immediate } from '../util/Immediate'; import { AsyncAction } from './AsyncAction'; import { AsapScheduler } from './AsapScheduler'; import { Action } from './Action'; diff --git a/src/internal/scheduler/AsyncAction.ts b/src/internal/scheduler/AsyncAction.ts index 7dae0297b8..a75fd947a3 100644 --- a/src/internal/scheduler/AsyncAction.ts +++ b/src/internal/scheduler/AsyncAction.ts @@ -1,4 +1,4 @@ -import { root } from '..//util/root'; +import { root } from '../util/root'; import { Action } from './Action'; import { Subscription } from '../Subscription'; import { AsyncScheduler } from './AsyncScheduler'; diff --git a/src/internal/symbol/iterator.ts b/src/internal/symbol/iterator.ts index 1c9001c267..cdee34a606 100644 --- a/src/internal/symbol/iterator.ts +++ b/src/internal/symbol/iterator.ts @@ -1,4 +1,4 @@ -import { root } from '..//util/root'; +import { root } from '../util/root'; export function symbolIteratorPonyfill(root: any) { const Symbol: any = root.Symbol; diff --git a/src/internal/symbol/observable.ts b/src/internal/symbol/observable.ts index 3f78b616d5..4940e85123 100644 --- a/src/internal/symbol/observable.ts +++ b/src/internal/symbol/observable.ts @@ -1,4 +1,4 @@ -import { root } from '..//util/root'; +import { root } from '../util/root'; export function getSymbolObservable(context: { Symbol: SymbolConstructor; }): symbol { let $$observable: symbol; diff --git a/src/internal/symbol/rxSubscriber.ts b/src/internal/symbol/rxSubscriber.ts index 62a9467274..693d0a9881 100644 --- a/src/internal/symbol/rxSubscriber.ts +++ b/src/internal/symbol/rxSubscriber.ts @@ -1,4 +1,4 @@ -import { root } from '..//util/root'; +import { root } from '../util/root'; const Symbol: any = root.Symbol; diff --git a/src/internal/testing/ColdObservable.ts b/src/internal/testing/ColdObservable.ts index fc3babd6b7..c185c293ab 100644 --- a/src/internal/testing/ColdObservable.ts +++ b/src/internal/testing/ColdObservable.ts @@ -4,7 +4,7 @@ import { Scheduler } from '../Scheduler'; import { TestMessage } from './TestMessage'; import { SubscriptionLog } from './SubscriptionLog'; import { SubscriptionLoggable } from './SubscriptionLoggable'; -import { applyMixins } from '..//util/applyMixins'; +import { applyMixins } from '../util/applyMixins'; import { Subscriber } from '../Subscriber'; /** diff --git a/src/internal/testing/HotObservable.ts b/src/internal/testing/HotObservable.ts index a49d8609a9..8918890ab9 100644 --- a/src/internal/testing/HotObservable.ts +++ b/src/internal/testing/HotObservable.ts @@ -5,7 +5,7 @@ import { Scheduler } from '../Scheduler'; import { TestMessage } from './TestMessage'; import { SubscriptionLog } from './SubscriptionLog'; import { SubscriptionLoggable } from './SubscriptionLoggable'; -import { applyMixins } from '..//util/applyMixins'; +import { applyMixins } from '../util/applyMixins'; /** * We need this JSDoc comment for affecting ESDoc. diff --git a/src/internal/types.ts b/src/internal/types.ts index 45711d5142..e9ce758b99 100644 --- a/src/internal/types.ts +++ b/src/internal/types.ts @@ -1,6 +1,7 @@ import { Observable } from './Observable'; -import { PartialObserver } from './Observer'; -import { AnonymousSubscription } from './Subscription'; +import { PartialObserver } from './types'; + +/** OPERATOR INTERFACES */ export interface UnaryFunction { (source: T): R; } @@ -10,15 +11,66 @@ export type FactoryOrValue = T | (() => T); export interface MonoTypeOperatorFunction extends OperatorFunction {} +/** SUBSCRIPTION INTERFACES */ + +export interface Unsubscribable { + unsubscribe(): void; +} + +export type TeardownLogic = Unsubscribable | Function | void; + +export interface SubscriptionLike extends Unsubscribable { + unsubscribe(): void; + readonly closed: boolean; +} + export interface Subscribable { subscribe(observerOrNext?: PartialObserver | ((value: T) => void), error?: (error: any) => void, - complete?: () => void): AnonymousSubscription; + complete?: () => void): Unsubscribable; } -export type ObservableLike = { [Symbol.observable]: () => Subscribable; }; export type SubscribableOrPromise = Subscribable | Subscribable | PromiseLike | ObservableLike; + +/** OBSERVABLE INTERFACES */ + +export interface Subscribable { + subscribe(observerOrNext?: PartialObserver | ((value: T) => void), + error?: (error: any) => void, + complete?: () => void): Unsubscribable; +} + export type ObservableInput = SubscribableOrPromise | ArrayLike | Iterable; +export type ObservableLike = { [Symbol.observable]: () => Subscribable; }; + +/** OBSERVER INTERFACES */ + +export interface NextObserver { + closed?: boolean; + next: (value: T) => void; + error?: (err: any) => void; + complete?: () => void; +} + +export interface ErrorObserver { + closed?: boolean; + next?: (value: T) => void; + error: (err: any) => void; + complete?: () => void; +} + +export interface CompletionObserver { + closed?: boolean; + next?: (value: T) => void; + error?: (err: any) => void; + complete: () => void; +} + +export type PartialObserver = NextObserver | ErrorObserver | CompletionObserver; -//TODO(benlesh): eventually we need to move all Observer interfaces to types.ts -export * from './Observer'; +export interface Observer { + closed?: boolean; + next: (value: T) => void; + error: (err: any) => void; + complete: () => void; +} \ No newline at end of file diff --git a/src/internal/util/isObservable.ts b/src/internal/util/isObservable.ts index b834ccceb5..725ee090af 100644 --- a/src/internal/util/isObservable.ts +++ b/src/internal/util/isObservable.ts @@ -1,4 +1,4 @@ -import { ObservableLike, Subscribable } from '../types'; +import { ObservableLike } from '../types'; import { observable as Symbol_observable } from '../symbol/observable'; /** Identifies an input as being Observable (but not necessary an Rx Observable) */ diff --git a/src/internal/util/subscribeTo.ts b/src/internal/util/subscribeTo.ts index 3a625f374b..ad9cec2f03 100644 --- a/src/internal/util/subscribeTo.ts +++ b/src/internal/util/subscribeTo.ts @@ -1,4 +1,5 @@ -import { Observable, ObservableInput } from '../Observable'; +import { Observable } from '../Observable'; +import { ObservableInput } from '../types'; import { subscribeToArray } from './subscribeToArray'; import { subscribeToPromise } from './subscribeToPromise'; import { subscribeToIterable } from './subscribeToIterable'; diff --git a/src/internal/util/subscribeToResult.ts b/src/internal/util/subscribeToResult.ts index 46839a7471..ba977b2ad9 100644 --- a/src/internal/util/subscribeToResult.ts +++ b/src/internal/util/subscribeToResult.ts @@ -1,5 +1,5 @@ -import { ObservableInput } from '../Observable'; +import { ObservableInput } from '../types'; import { Subscription } from '../Subscription'; import { InnerSubscriber } from '../InnerSubscriber'; import { OuterSubscriber } from '../OuterSubscriber'; diff --git a/src/internal/util/toSubscriber.ts b/src/internal/util/toSubscriber.ts index 134fa56b17..e03d1400ae 100644 --- a/src/internal/util/toSubscriber.ts +++ b/src/internal/util/toSubscriber.ts @@ -1,6 +1,7 @@ import { Subscriber } from '../Subscriber'; import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber'; -import { PartialObserver, empty as emptyObserver } from '../Observer'; +import { empty as emptyObserver } from '../Observer'; +import { PartialObserver } from '../types'; export function toSubscriber( nextOrObserver?: PartialObserver | ((value: T) => void), diff --git a/tsconfig.json b/tsconfig.json index bfe7976e9f..bbe84992e1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,28 +1,29 @@ -{ - "compilerOptions": { - "removeComments": false, - "preserveConstEnums": true, - "sourceMap": true, - "strictFunctionTypes": true, - "noImplicitAny": true, - "noImplicitReturns": true, - "noImplicitThis": true, - "suppressImplicitAnyIndexErrors": true, - "moduleResolution": "node", - "target": "es5", - "outDir": "./.out", - "lib": [ - "es5", - "es2015.iterable", - "es2015.collection", - "es2015.promise", - "es2015.symbol", - "es2015.symbol.wellknown", - "dom" - ] - }, - "formatCodeOptions": { - "indentSize": 2, - "tabSize": 2 - } +{ + "compilerOptions": { + "removeComments": false, + "preserveConstEnums": true, + "sourceMap": true, + "strictFunctionTypes": true, + "noImplicitAny": true, + "noImplicitReturns": true, + "noImplicitThis": true, + "suppressImplicitAnyIndexErrors": true, + "moduleResolution": "node", + "stripInternal": true, + "target": "es5", + "outDir": "./.out", + "lib": [ + "es5", + "es2015.iterable", + "es2015.collection", + "es2015.promise", + "es2015.symbol", + "es2015.symbol.wellknown", + "dom" + ] + }, + "formatCodeOptions": { + "indentSize": 2, + "tabSize": 2 + } } \ No newline at end of file diff --git a/tslint.json b/tslint.json index 81121d2fb9..ed853108b7 100644 --- a/tslint.json +++ b/tslint.json @@ -18,6 +18,7 @@ "no-consecutive-blank-lines": true, "no-trailing-whitespace": true, "no-duplicate-variable": true, + "no-duplicate-imports": true, "no-var-keyword": true, "no-empty": true, "no-unused-expression-chai": true,