|
1 | 1 | import {Observable} from './Observable'; |
2 | 2 | import {CoreOperators} from './CoreOperators'; |
| 3 | +import {KitchenSinkOperators} from './KitchenSinkOperators'; |
3 | 4 | import {Scheduler as IScheduler} from './Scheduler'; |
4 | 5 | import {_PredicateObservable} from './types'; |
5 | | - |
6 | | -interface KitchenSinkOperators<T> extends CoreOperators<T> { |
7 | | - isEmpty?: () => Observable<boolean>; |
8 | | - elementAt?: (index: number, defaultValue?: any) => Observable<T>; |
9 | | - distinctUntilKeyChanged?: (key: string, compare?: (x: any, y: any) => boolean, thisArg?: any) => Observable<T>; |
10 | | - find?: (predicate: _PredicateObservable<T>, thisArg?: any) => Observable<T>; |
11 | | - findIndex?: (predicate: _PredicateObservable<T>, thisArg?: any) => Observable<number>; |
12 | | - max?: <T, R>(comparer?: (x: R, y: T) => R) => Observable<R>; |
13 | | - min?: <T, R>(comparer?: (x: R, y: T) => R) => Observable<R>; |
14 | | - timeInterval?: <T>(scheduler?: IScheduler) => Observable<T>; |
15 | | - mergeScan?: <T, R>(project: (acc: R, x: T) => Observable<R>, seed: R) => Observable<R>; |
16 | | - switchFirst?: () => Observable<T>; |
17 | | - switchMapFirst?: <R>(project: ((x: T, ix: number) => Observable<any>), |
18 | | - projectResult?: (x: T, y: any, ix: number, iy: number) => R) => Observable<R>; |
19 | | -} |
| 6 | +import * as operators from './operator-typings'; |
20 | 7 |
|
21 | 8 | // operators |
22 | 9 | /* tslint:disable:no-use-before-declare */ |
@@ -75,7 +62,7 @@ import {zip as zipStatic} from './operators/zip-static'; |
75 | 62 | Observable.zip = zipStatic; |
76 | 63 |
|
77 | 64 | // Operators |
78 | | -const observableProto = (<KitchenSinkOperators<any>>Observable.prototype); |
| 65 | +const observableProto:KitchenSinkOperators<any> = (<any>Observable.prototype); |
79 | 66 |
|
80 | 67 | import {buffer} from './operators/buffer'; |
81 | 68 | observableProto.buffer = buffer; |
@@ -278,10 +265,10 @@ import {switchMapTo} from './operators/switchMapTo'; |
278 | 265 | observableProto.switchMapTo = switchMapTo; |
279 | 266 |
|
280 | 267 | import {switchFirst} from './operators/switchFirst'; |
281 | | -observableProto.switchFirst = switchFirst; |
| 268 | +observableProto.switchFirst = <any>switchFirst; |
282 | 269 |
|
283 | 270 | import {switchMapFirst} from './operators/switchMapFirst'; |
284 | | -observableProto.switchMapFirst = switchMapFirst; |
| 271 | +observableProto.switchMapFirst = <any>switchMapFirst; |
285 | 272 |
|
286 | 273 | import {take} from './operators/take'; |
287 | 274 | observableProto.take = take; |
|
0 commit comments