Skip to content

Commit 207976f

Browse files
committed
feat(reorganize): move operator impls under internal directory
- moves operators directory under `internal`. - moves `operators.ts` to `internal/operators/index.ts`
1 parent 4574310 commit 207976f

File tree

209 files changed

+1077
-916
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

209 files changed

+1077
-916
lines changed

spec/Observable-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import * as sinon from 'sinon';
33
import * as Rx from '../src/Rx';
44
import { TeardownLogic } from '../src/Subscription';
55
import marbleTestingSignature = require('./helpers/marble-testing'); // tslint:disable-line:no-require-imports
6-
import { map } from '../src/operators/map';
6+
import { map } from '../src/internal/operators/map';
77
//tslint:disable-next-line
88
require('./helpers/test-helper');
99

spec/operators/groupBy-spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { expect } from 'chai';
22
import * as Rx from '../../src/Rx';
3-
import { GroupedObservable } from '../../src/operators/groupBy';
3+
import { GroupedObservable } from '../../src/internal/operators/groupBy';
44
import marbleTestingSignature = require('../helpers/marble-testing'); // tslint:disable-line:no-require-imports
55

66
declare const { asDiagram };

src/Observable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ export class Observable<T> implements Subscribable<T> {
288288
*
289289
* @example
290290
*
291-
* import { map, filter, scan } from 'rxjs/operators';
291+
* import { map, filter, scan } from 'rxjs/internal/operators';
292292
*
293293
* Rx.Observable.interval(1000)
294294
* .pipe(

src/ReplaySubject.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { IScheduler } from './Scheduler';
33
import { queue } from './scheduler/queue';
44
import { Subscriber } from './Subscriber';
55
import { Subscription } from './Subscription';
6-
import { ObserveOnSubscriber } from './operators/observeOn';
6+
import { ObserveOnSubscriber } from './internal/operators/observeOn';
77
import { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';
88
import { SubjectSubscription } from './SubjectSubscription';
99
/**

src/Rx.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ import './add/observable/zip';
3838
import './add/observable/dom/ajax';
3939
import './add/observable/dom/webSocket';
4040

41-
//operators
41+
//internal/operators
4242
import './add/operator/buffer';
4343
import './add/operator/bufferCount';
4444
import './add/operator/bufferTime';
@@ -158,7 +158,7 @@ export {ObjectUnsubscribedError} from './util/ObjectUnsubscribedError';
158158
export {TimeoutError} from './util/TimeoutError';
159159
export {UnsubscriptionError} from './util/UnsubscriptionError';
160160
export {TimeInterval} from './internal/patching/operator/timeInterval';
161-
export {Timestamp} from './operators/timestamp';
161+
export {Timestamp} from './internal/operators/timestamp';
162162
export {TestScheduler} from './testing/TestScheduler';
163163
export {VirtualTimeScheduler} from './scheduler/VirtualTimeScheduler';
164164
export {AjaxRequest, AjaxResponse, AjaxError, AjaxTimeoutError} from './internal/observable/dom/AjaxObservable';
@@ -176,7 +176,7 @@ import { rxSubscriber } from './symbol/rxSubscriber';
176176
import { iterator } from './symbol/iterator';
177177
import { observable } from './symbol/observable';
178178

179-
import * as _operators from './operators';
179+
import * as _operators from './internal/operators';
180180

181181
export const operators = _operators;
182182

src/index.ts

Lines changed: 96 additions & 96 deletions
Original file line numberDiff line numberDiff line change
@@ -25,108 +25,108 @@ export { using } from './internal/observable/using';
2525
export { zip } from './internal/observable/zip';
2626

2727
/* Operator exports */
28-
export { audit } from './operators/audit';
29-
export { auditTime } from './operators/auditTime';
30-
export { buffer } from './operators/buffer';
31-
export { bufferCount } from './operators/bufferCount';
32-
export { bufferTime } from './operators/bufferTime';
33-
export { bufferToggle } from './operators/bufferToggle';
34-
export { bufferWhen } from './operators/bufferWhen';
35-
export { catchError } from './operators/catchError';
36-
export { combineAll } from './operators/combineAll';
37-
export { concatAll } from './operators/concatAll';
38-
export { concatMap } from './operators/concatMap';
39-
export { concatMapTo } from './operators/concatMapTo';
40-
export { count } from './operators/count';
41-
export { debounce } from './operators/debounce';
42-
export { debounceTime } from './operators/debounceTime';
43-
export { defaultIfEmpty } from './operators/defaultIfEmpty';
44-
export { delay } from './operators/delay';
45-
export { delayWhen } from './operators/delayWhen';
46-
export { dematerialize } from './operators/dematerialize';
47-
export { distinct } from './operators/distinct';
48-
export { distinctUntilChanged } from './operators/distinctUntilChanged';
49-
export { distinctUntilKeyChanged } from './operators/distinctUntilKeyChanged';
50-
export { elementAt } from './operators/elementAt';
51-
export { every } from './operators/every';
52-
export { exhaust } from './operators/exhaust';
53-
export { exhaustMap } from './operators/exhaustMap';
54-
export { expand } from './operators/expand';
55-
export { filter } from './operators/filter';
56-
export { finalize } from './operators/finalize';
57-
export { find } from './operators/find';
58-
export { findIndex } from './operators/findIndex';
59-
export { first } from './operators/first';
60-
export { groupBy } from './operators/groupBy';
61-
export { ignoreElements } from './operators/ignoreElements';
62-
export { isEmpty } from './operators/isEmpty';
63-
export { last } from './operators/last';
64-
export { map } from './operators/map';
65-
export { mapTo } from './operators/mapTo';
66-
export { materialize } from './operators/materialize';
67-
export { max } from './operators/max';
68-
export { mergeAll } from './operators/mergeAll';
69-
export { mergeMap } from './operators/mergeMap';
70-
export { mergeMap as flatMap } from './operators/mergeMap';
71-
export { mergeMapTo } from './operators/mergeMapTo';
72-
export { mergeScan } from './operators/mergeScan';
73-
export { min } from './operators/min';
74-
export { multicast } from './operators/multicast';
75-
export { observeOn } from './operators/observeOn';
76-
export { pairwise } from './operators/pairwise';
77-
export { partition } from './operators/partition';
78-
export { pluck } from './operators/pluck';
79-
export { publish } from './operators/publish';
80-
export { publishBehavior } from './operators/publishBehavior';
81-
export { publishLast } from './operators/publishLast';
82-
export { publishReplay } from './operators/publishReplay';
83-
export { reduce } from './operators/reduce';
84-
export { repeat } from './operators/repeat';
85-
export { repeatWhen } from './operators/repeatWhen';
86-
export { retry } from './operators/retry';
87-
export { retryWhen } from './operators/retryWhen';
88-
export { refCount } from './operators/refCount';
89-
export { sample } from './operators/sample';
90-
export { sampleTime } from './operators/sampleTime';
91-
export { scan } from './operators/scan';
92-
export { sequenceEqual } from './operators/sequenceEqual';
93-
export { share } from './operators/share';
94-
export { shareReplay } from './operators/shareReplay';
95-
export { single } from './operators/single';
96-
export { skip } from './operators/skip';
97-
export { skipLast } from './operators/skipLast';
98-
export { skipUntil } from './operators/skipUntil';
99-
export { skipWhile } from './operators/skipWhile';
100-
export { startWith } from './operators/startWith';
28+
export { audit } from './internal/operators/audit';
29+
export { auditTime } from './internal/operators/auditTime';
30+
export { buffer } from './internal/operators/buffer';
31+
export { bufferCount } from './internal/operators/bufferCount';
32+
export { bufferTime } from './internal/operators/bufferTime';
33+
export { bufferToggle } from './internal/operators/bufferToggle';
34+
export { bufferWhen } from './internal/operators/bufferWhen';
35+
export { catchError } from './internal/operators/catchError';
36+
export { combineAll } from './internal/operators/combineAll';
37+
export { concatAll } from './internal/operators/concatAll';
38+
export { concatMap } from './internal/operators/concatMap';
39+
export { concatMapTo } from './internal/operators/concatMapTo';
40+
export { count } from './internal/operators/count';
41+
export { debounce } from './internal/operators/debounce';
42+
export { debounceTime } from './internal/operators/debounceTime';
43+
export { defaultIfEmpty } from './internal/operators/defaultIfEmpty';
44+
export { delay } from './internal/operators/delay';
45+
export { delayWhen } from './internal/operators/delayWhen';
46+
export { dematerialize } from './internal/operators/dematerialize';
47+
export { distinct } from './internal/operators/distinct';
48+
export { distinctUntilChanged } from './internal/operators/distinctUntilChanged';
49+
export { distinctUntilKeyChanged } from './internal/operators/distinctUntilKeyChanged';
50+
export { elementAt } from './internal/operators/elementAt';
51+
export { every } from './internal/operators/every';
52+
export { exhaust } from './internal/operators/exhaust';
53+
export { exhaustMap } from './internal/operators/exhaustMap';
54+
export { expand } from './internal/operators/expand';
55+
export { filter } from './internal/operators/filter';
56+
export { finalize } from './internal/operators/finalize';
57+
export { find } from './internal/operators/find';
58+
export { findIndex } from './internal/operators/findIndex';
59+
export { first } from './internal/operators/first';
60+
export { groupBy } from './internal/operators/groupBy';
61+
export { ignoreElements } from './internal/operators/ignoreElements';
62+
export { isEmpty } from './internal/operators/isEmpty';
63+
export { last } from './internal/operators/last';
64+
export { map } from './internal/operators/map';
65+
export { mapTo } from './internal/operators/mapTo';
66+
export { materialize } from './internal/operators/materialize';
67+
export { max } from './internal/operators/max';
68+
export { mergeAll } from './internal/operators/mergeAll';
69+
export { mergeMap } from './internal/operators/mergeMap';
70+
export { mergeMap as flatMap } from './internal/operators/mergeMap';
71+
export { mergeMapTo } from './internal/operators/mergeMapTo';
72+
export { mergeScan } from './internal/operators/mergeScan';
73+
export { min } from './internal/operators/min';
74+
export { multicast } from './internal/operators/multicast';
75+
export { observeOn } from './internal/operators/observeOn';
76+
export { pairwise } from './internal/operators/pairwise';
77+
export { partition } from './internal/operators/partition';
78+
export { pluck } from './internal/operators/pluck';
79+
export { publish } from './internal/operators/publish';
80+
export { publishBehavior } from './internal/operators/publishBehavior';
81+
export { publishLast } from './internal/operators/publishLast';
82+
export { publishReplay } from './internal/operators/publishReplay';
83+
export { reduce } from './internal/operators/reduce';
84+
export { repeat } from './internal/operators/repeat';
85+
export { repeatWhen } from './internal/operators/repeatWhen';
86+
export { retry } from './internal/operators/retry';
87+
export { retryWhen } from './internal/operators/retryWhen';
88+
export { refCount } from './internal/operators/refCount';
89+
export { sample } from './internal/operators/sample';
90+
export { sampleTime } from './internal/operators/sampleTime';
91+
export { scan } from './internal/operators/scan';
92+
export { sequenceEqual } from './internal/operators/sequenceEqual';
93+
export { share } from './internal/operators/share';
94+
export { shareReplay } from './internal/operators/shareReplay';
95+
export { single } from './internal/operators/single';
96+
export { skip } from './internal/operators/skip';
97+
export { skipLast } from './internal/operators/skipLast';
98+
export { skipUntil } from './internal/operators/skipUntil';
99+
export { skipWhile } from './internal/operators/skipWhile';
100+
export { startWith } from './internal/operators/startWith';
101101
/**
102102
* TODO(https://github.com/ReactiveX/rxjs/issues/2900): Add back subscribeOn once it can be
103103
* treeshaken. Currently if this export is added back, it
104104
* forces apps to bring in asap scheduler along with
105105
* Immediate, root, and other supporting code.
106106
*/
107-
// export { subscribeOn } from './operators/subscribeOn';
108-
export { switchAll } from './operators/switchAll';
109-
export { switchMap } from './operators/switchMap';
110-
export { switchMapTo } from './operators/switchMapTo';
111-
export { take } from './operators/take';
112-
export { takeLast } from './operators/takeLast';
113-
export { takeUntil } from './operators/takeUntil';
114-
export { takeWhile } from './operators/takeWhile';
115-
export { tap } from './operators/tap';
116-
export { throttle } from './operators/throttle';
117-
export { throttleTime } from './operators/throttleTime';
118-
export { timeInterval } from './operators/timeInterval';
119-
export { timeout } from './operators/timeout';
120-
export { timeoutWith } from './operators/timeoutWith';
121-
export { timestamp } from './operators/timestamp';
122-
export { toArray } from './operators/toArray';
123-
export { window } from './operators/window';
124-
export { windowCount } from './operators/windowCount';
125-
export { windowTime } from './operators/windowTime';
126-
export { windowToggle } from './operators/windowToggle';
127-
export { windowWhen } from './operators/windowWhen';
128-
export { withLatestFrom } from './operators/withLatestFrom';
129-
export { zipAll } from './operators/zipAll';
107+
// export { subscribeOn } from './internal/operators/subscribeOn';
108+
export { switchAll } from './internal/operators/switchAll';
109+
export { switchMap } from './internal/operators/switchMap';
110+
export { switchMapTo } from './internal/operators/switchMapTo';
111+
export { take } from './internal/operators/take';
112+
export { takeLast } from './internal/operators/takeLast';
113+
export { takeUntil } from './internal/operators/takeUntil';
114+
export { takeWhile } from './internal/operators/takeWhile';
115+
export { tap } from './internal/operators/tap';
116+
export { throttle } from './internal/operators/throttle';
117+
export { throttleTime } from './internal/operators/throttleTime';
118+
export { timeInterval } from './internal/operators/timeInterval';
119+
export { timeout } from './internal/operators/timeout';
120+
export { timeoutWith } from './internal/operators/timeoutWith';
121+
export { timestamp } from './internal/operators/timestamp';
122+
export { toArray } from './internal/operators/toArray';
123+
export { window } from './internal/operators/window';
124+
export { windowCount } from './internal/operators/windowCount';
125+
export { windowTime } from './internal/operators/windowTime';
126+
export { windowToggle } from './internal/operators/windowToggle';
127+
export { windowWhen } from './internal/operators/windowWhen';
128+
export { withLatestFrom } from './internal/operators/withLatestFrom';
129+
export { zipAll } from './internal/operators/zipAll';
130130

131131
/* Subjects */
132132
export { Subject } from './Subject';

src/internal/observable/ConnectableObservable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Operator } from '../../Operator';
33
import { Observable } from '../../Observable';
44
import { Subscriber } from '../../Subscriber';
55
import { Subscription, TeardownLogic } from '../../Subscription';
6-
import { refCount as higherOrderRefCount } from '../../operators/refCount';
6+
import { refCount as higherOrderRefCount } from '../../internal/operators/refCount';
77

88
/**
99
* @class ConnectableObservable<T>

src/internal/observable/FromObservable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { IScheduler } from '../../Scheduler';
1010
import { iterator as Symbol_iterator } from '../../symbol/iterator';
1111
import { Observable, ObservableInput } from '../../Observable';
1212
import { Subscriber } from '../../Subscriber';
13-
import { ObserveOnSubscriber } from '../../operators/observeOn';
13+
import { ObserveOnSubscriber } from '../../internal/operators/observeOn';
1414
import { observable as Symbol_observable } from '../../symbol/observable';
1515

1616
/**

src/internal/observable/concat.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { IScheduler } from '../../Scheduler';
33
import { isScheduler } from '../../util/isScheduler';
44
import { of } from './of';
55
import { from } from './from';
6-
import { concatAll } from '../../operators/concatAll';
6+
import { concatAll } from '../../internal/operators/concatAll';
77

88
/* tslint:disable:max-line-length */
99
export function concat<T>(v1: ObservableInput<T>, scheduler?: IScheduler): Observable<T>;

src/internal/observable/dom/AjaxObservable.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import { errorObject } from '../../../util/errorObject';
44
import { Observable } from '../../../Observable';
55
import { Subscriber } from '../../../Subscriber';
66
import { TeardownLogic } from '../../../Subscription';
7-
import { map } from '../../../operators/map';
7+
import { map } from '../../../internal/operators/map';
88

99
export interface AjaxRequest {
1010
url?: string;

0 commit comments

Comments
 (0)