Skip to content

Commit

Permalink
refactor(Rx): move inspect operators to KitchenSink
Browse files Browse the repository at this point in the history
Given that one could get the behavior of `inspect` operators with `sample` and some composition, moving
`inspect` operators to `KitchenSink` and out of Rx Core.

BREAKING CHANGE: `inspect` operators are now in KitchenSink only
  • Loading branch information
benlesh committed Dec 14, 2015
1 parent 6835dcd commit 0f9d45b
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion spec/operators/inspect-spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* globals describe, it, expect, hot, expectObservable,, expectSubscriptions */
var Rx = require('../../dist/cjs/Rx');
var Rx = require('../../dist/cjs/Rx.KitchenSink');
var Observable = Rx.Observable;

describe('Observable.prototype.inspect', function () {
Expand Down
2 changes: 1 addition & 1 deletion spec/operators/inspectTime-spec.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* globals describe, it, expect, expectObservable, expectSubscriptions, cold, hot, rxTestScheduler */
var Rx = require('../../dist/cjs/Rx');
var Rx = require('../../dist/cjs/Rx.KitchenSink');
var Observable = Rx.Observable;

describe('Observable.prototype.inspectTime', function () {
Expand Down
2 changes: 0 additions & 2 deletions src/CoreOperators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,6 @@ export interface CoreOperators<T> {
elementSelector?: (value: T) => R,
durationSelector?: (group: GroupedObservable<R>) => Observable<any>) => Observable<GroupedObservable<R>>;
ignoreElements?: () => Observable<T>;
inspect?: (notifier: Observable<any>) => Observable<T>;
inspectTime?: (delay: number, scheduler?: Scheduler) => Observable<T>;
last?: <R>(predicate?: (value: T, index: number) => boolean,
resultSelector?: (value: T, index: number) => R,
defaultValue?: any) => Observable<T> | Observable<R>;
Expand Down
2 changes: 2 additions & 0 deletions src/Rx.KitchenSink.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export interface KitchenSinkOperators<T> extends CoreOperators<T> {
distinctUntilKeyChanged?: (key: string, compare?: (x: any, y: any) => boolean) => Observable<T>;
find?: (predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<T>;
findIndex?: (predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any) => Observable<number>;
inspect?: (notifier: Observable<any>) => Observable<T>;
inspectTime?: (delay: number, scheduler?: IScheduler) => Observable<T>;
max?: <T, R>(comparer?: (x: R, y: T) => R) => Observable<R>;
min?: <T, R>(comparer?: (x: R, y: T) => R) => Observable<R>;
timeInterval?: <T>(scheduler?: IScheduler) => Observable<T>;
Expand Down
2 changes: 0 additions & 2 deletions src/Rx.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ import './add/operator/finally';
import './add/operator/first';
import './add/operator/groupBy';
import './add/operator/ignoreElements';
import './add/operator/inspect';
import './add/operator/inspectTime';
import './add/operator/every';
import './add/operator/last';
import './add/operator/map';
Expand Down

0 comments on commit 0f9d45b

Please sign in to comment.