Socket
Socket
Sign inDemoInstall

rxjs

Package Overview
Dependencies
0
Maintainers
2
Versions
165
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 5.0.0-beta.0 to 5.0.0-beta.1

add/observable/bindNodeCallback.d.ts

4

add/observable/bindCallback.js

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var bindCallback_1 = require('../../observable/bindCallback');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var defer_1 = require('../../observable/defer');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var empty_1 = require('../../observable/empty');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var forkJoin_1 = require('../../observable/forkJoin');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var from_1 = require('../../observable/from');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var fromArray_1 = require('../../observable/fromArray');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var fromEvent_1 = require('../../observable/fromEvent');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var fromEventPattern_1 = require('../../observable/fromEventPattern');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var fromPromise_1 = require('../../observable/fromPromise');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var interval_1 = require('../../observable/interval');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var never_1 = require('../../observable/never');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var range_1 = require('../../observable/range');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var throw_1 = require('../../observable/throw');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var timer_1 = require('../../observable/timer');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var buffer_1 = require('../../operator/buffer');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var bufferCount_1 = require('../../operator/bufferCount');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var bufferTime_1 = require('../../operator/bufferTime');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var bufferToggle_1 = require('../../operator/bufferToggle');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var bufferWhen_1 = require('../../operator/bufferWhen');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var catch_1 = require('../../operator/catch');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var combineAll_1 = require('../../operator/combineAll');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var combineLatest_static_1 = require('../../operator/combineLatest-static');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var combineLatest_1 = require('../../operator/combineLatest');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var concat_static_1 = require('../../operator/concat-static');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var concat_1 = require('../../operator/concat');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var concatAll_1 = require('../../operator/concatAll');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var concatMap_1 = require('../../operator/concatMap');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var concatMapTo_1 = require('../../operator/concatMapTo');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var count_1 = require('../../operator/count');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var debounce_1 = require('../../operator/debounce');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var debounceTime_1 = require('../../operator/debounceTime');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var defaultIfEmpty_1 = require('../../operator/defaultIfEmpty');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var delay_1 = require('../../operator/delay');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var dematerialize_1 = require('../../operator/dematerialize');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var distinctUntilChanged_1 = require('../../operator/distinctUntilChanged');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var distinctUntilKeyChanged_1 = require('../../operator/distinctUntilKeyChanged');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var do_1 = require('../../operator/do');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var elementAt_1 = require('../../operator/elementAt');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var every_1 = require('../../operator/every');

@@ -0,4 +1,9 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');
var exhaust_1 = require('../../operator/exhaust');
Observable_1.Observable.prototype.exhaust = exhaust_1.exhaust;
var observableProto = Observable_1.Observable.prototype;
observableProto.exhaust = exhaust_1.exhaust;
//# sourceMappingURL=exhaust.js.map

@@ -0,4 +1,9 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');
var exhaustMap_1 = require('../../operator/exhaustMap');
Observable_1.Observable.prototype.exhaustMap = exhaustMap_1.exhaustMap;
var observableProto = Observable_1.Observable.prototype;
observableProto.exhaustMap = exhaustMap_1.exhaustMap;
//# sourceMappingURL=exhaustMap.js.map

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var expand_1 = require('../../operator/expand');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var filter_1 = require('../../operator/filter');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var finally_1 = require('../../operator/finally');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var find_1 = require('../../operator/find');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var findIndex_1 = require('../../operator/findIndex');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var first_1 = require('../../operator/first');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var groupBy_1 = require('../../operator/groupBy');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var ignoreElements_1 = require('../../operator/ignoreElements');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var isEmpty_1 = require('../../operator/isEmpty');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var last_1 = require('../../operator/last');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var map_1 = require('../../operator/map');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var mapTo_1 = require('../../operator/mapTo');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var materialize_1 = require('../../operator/materialize');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var max_1 = require('../../operator/max');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var merge_static_1 = require('../../operator/merge-static');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var merge_1 = require('../../operator/merge');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var mergeAll_1 = require('../../operator/mergeAll');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var mergeMap_1 = require('../../operator/mergeMap');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var mergeMapTo_1 = require('../../operator/mergeMapTo');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var mergeScan_1 = require('../../operator/mergeScan');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var min_1 = require('../../operator/min');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var multicast_1 = require('../../operator/multicast');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var observeOn_1 = require('../../operator/observeOn');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var partition_1 = require('../../operator/partition');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var publish_1 = require('../../operator/publish');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var publishBehavior_1 = require('../../operator/publishBehavior');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var publishLast_1 = require('../../operator/publishLast');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var publishReplay_1 = require('../../operator/publishReplay');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var reduce_1 = require('../../operator/reduce');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var repeat_1 = require('../../operator/repeat');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var retry_1 = require('../../operator/retry');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var retryWhen_1 = require('../../operator/retryWhen');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var sample_1 = require('../../operator/sample');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var sampleTime_1 = require('../../operator/sampleTime');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var scan_1 = require('../../operator/scan');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var share_1 = require('../../operator/share');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var single_1 = require('../../operator/single');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var skip_1 = require('../../operator/skip');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var skipUntil_1 = require('../../operator/skipUntil');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var skipWhile_1 = require('../../operator/skipWhile');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var startWith_1 = require('../../operator/startWith');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var subscribeOn_1 = require('../../operator/subscribeOn');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var switch_1 = require('../../operator/switch');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var switchMap_1 = require('../../operator/switchMap');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var switchMapTo_1 = require('../../operator/switchMapTo');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var take_1 = require('../../operator/take');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var takeUntil_1 = require('../../operator/takeUntil');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var takeWhile_1 = require('../../operator/takeWhile');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var throttle_1 = require('../../operator/throttle');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var throttleTime_1 = require('../../operator/throttleTime');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var timeInterval_1 = require('../../operator/timeInterval');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var timeout_1 = require('../../operator/timeout');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var timeoutWith_1 = require('../../operator/timeoutWith');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var toArray_1 = require('../../operator/toArray');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var toPromise_1 = require('../../operator/toPromise');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var window_1 = require('../../operator/window');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var windowCount_1 = require('../../operator/windowCount');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var windowTime_1 = require('../../operator/windowTime');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var windowToggle_1 = require('../../operator/windowToggle');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var windowWhen_1 = require('../../operator/windowWhen');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var withLatestFrom_1 = require('../../operator/withLatestFrom');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var zip_static_1 = require('../../operator/zip-static');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var zip_1 = require('../../operator/zip');

@@ -0,1 +1,5 @@

/**
* Everything in this file is generated by the 'tools/generate-operator-patches.ts' script.
* Any manual edits to this file will be lost next time the script is run.
**/
var Observable_1 = require('../../Observable');

@@ -2,0 +6,0 @@ var zipAll_1 = require('../../operator/zipAll');

2

CoreOperators.d.ts

@@ -34,3 +34,3 @@ import { Observable } from './Observable';

flatMapTo?: <R>(observable: Observable<any>, projectResult?: (x: T, y: any, ix: number, iy: number) => R, concurrent?: number) => Observable<R>;
groupBy?: <R>(keySelector: (value: T) => string, elementSelector?: (value: T) => R, durationSelector?: (group: GroupedObservable<R>) => Observable<any>) => Observable<GroupedObservable<R>>;
groupBy?: <K, R>(keySelector: (value: T) => string, elementSelector?: (value: T) => R, durationSelector?: (group: GroupedObservable<K, R>) => Observable<any>) => Observable<GroupedObservable<K, R>>;
ignoreElements?: () => Observable<T>;

@@ -37,0 +37,0 @@ last?: <R>(predicate?: (value: T, index: number) => boolean, resultSelector?: (value: T, index: number) => R, defaultValue?: any) => Observable<T> | Observable<R>;

@@ -7,7 +7,7 @@ import { Subscriber } from './Subscriber';

private outerIndex;
index: number;
private index;
constructor(parent: OuterSubscriber<T, R>, outerValue: T, outerIndex: number);
_next(value: R): void;
_error(error: any): void;
_complete(): void;
protected _next(value: R): void;
protected _error(error: any): void;
protected _complete(): void;
}

@@ -17,10 +17,11 @@ var __extends = (this && this.__extends) || function (d, b) {

InnerSubscriber.prototype._next = function (value) {
var index = this.index++;
this.parent.notifyNext(this.outerValue, value, this.outerIndex, index);
this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++);
};
InnerSubscriber.prototype._error = function (error) {
this.parent.notifyError(error, this);
this.unsubscribe();
};
InnerSubscriber.prototype._complete = function () {
this.parent.notifyComplete(this);
this.unsubscribe();
};

@@ -27,0 +28,0 @@ return InnerSubscriber;

@@ -11,2 +11,24 @@ import { Observer } from './Observer';

import { Notification } from './Notification';
import { combineLatest as combineLatestStatic } from './operator/combineLatest-static';
import { concat as concatStatic } from './operator/concat-static';
import { merge as mergeStatic } from './operator/merge-static';
import { zip as zipStatic } from './operator/zip-static';
import { BoundCallbackObservable } from './observable/bindCallback';
import { BoundNodeCallbackObservable } from './observable/bindNodeCallback';
import { DeferObservable } from './observable/defer';
import { EmptyObservable } from './observable/empty';
import { ForkJoinObservable } from './observable/forkJoin';
import { FromObservable } from './observable/from';
import { ArrayObservable } from './observable/fromArray';
import { FromEventObservable } from './observable/fromEvent';
import { FromEventPatternObservable } from './observable/fromEventPattern';
import { PromiseObservable } from './observable/fromPromise';
import { IntervalObservable } from './observable/interval';
import { TimerObservable } from './observable/timer';
import { race as raceStatic } from './operator/race-static';
import { RangeObservable } from './observable/range';
import { InfiniteObservable } from './observable/never';
import { ErrorObservable } from './observable/throw';
import { AjaxCreationMethod } from './observable/dom/ajax';
import { WebSocketSubject } from './observable/dom/webSocket';
/**

@@ -19,5 +41,5 @@ * A representation of any set of values over any amount of time. This the most basic building block

export declare class Observable<T> implements CoreOperators<T> {
source: Observable<any>;
operator: Operator<any, T>;
_isScalar: boolean;
protected source: Observable<any>;
protected operator: Operator<any, T>;
/**

@@ -30,3 +52,3 @@ * @constructor

*/
constructor(subscribe?: <R>(subscriber: Subscriber<R>) => Subscription<T> | Function | void);
constructor(subscribe?: <R>(subscriber: Subscriber<R>) => Subscription | Function | void);
/**

@@ -47,3 +69,3 @@ * @static

*/
lift<T, R>(operator: Operator<T, R>): Observable<T>;
lift<T, R>(operator: Operator<T, R>): Observable<R>;
/**

@@ -60,3 +82,3 @@ * @method subscribe

*/
subscribe(observerOrNext?: Observer<T> | ((value: T) => void), error?: (error: T) => void, complete?: () => void): Subscription<T>;
subscribe(observerOrNext?: Observer<T> | ((value: T) => void), error?: (error: any) => void, complete?: () => void): Subscription;
/**

@@ -71,22 +93,26 @@ * @method forEach

forEach(next: (value: T) => void, thisArg: any, PromiseCtor?: PromiseConstructor): Promise<void>;
_subscribe(subscriber: Subscriber<any>): Subscription<T> | Function | void;
static bindCallback: <T>(callbackFunc: Function, selector?: Function, scheduler?: Scheduler) => Function;
static combineLatest: <T>(...observables: Array<Observable<any> | Array<Observable<any>> | ((...values: Array<any>) => T) | Scheduler>) => Observable<T>;
static concat: <T>(...observables: Array<Observable<any> | Scheduler>) => Observable<T>;
static defer: <T>(observableFactory: () => Observable<T>) => Observable<T>;
static empty: <T>(scheduler?: Scheduler) => Observable<T>;
static forkJoin: (...sources: Array<Observable<any> | Array<Observable<any>> | Promise<any> | ((...values: Array<any>) => any)>) => Observable<any>;
static from: <T>(iterable: any, scheduler?: Scheduler) => Observable<T>;
static fromArray: <T>(array: T[], scheduler?: Scheduler) => Observable<T>;
static fromEvent: <T>(element: any, eventName: string, selector?: (...args: Array<any>) => T) => Observable<T>;
static fromEventPattern: <T>(addHandler: (handler: Function) => void, removeHandler: (handler: Function) => void, selector?: (...args: Array<any>) => T) => Observable<T>;
static fromPromise: <T>(promise: Promise<T>, scheduler?: Scheduler) => Observable<T>;
static interval: (interval: number, scheduler?: Scheduler) => Observable<number>;
static merge: <T>(...observables: Array<Observable<any> | Scheduler | number>) => Observable<T>;
static never: <T>() => Observable<T>;
static of: <T>(...values: Array<T | Scheduler>) => Observable<T>;
static range: (start: number, end: number, scheduler?: Scheduler) => Observable<number>;
static throw: <T>(error: T) => Observable<T>;
static timer: (dueTime?: number | Date, period?: number | Scheduler, scheduler?: Scheduler) => Observable<number>;
static zip: <T>(...observables: Array<Observable<any> | ((...values: Array<any>) => T)>) => Observable<T>;
_subscribe(subscriber: Subscriber<any>): Subscription | Function | void;
static ajax: AjaxCreationMethod;
static bindCallback: typeof BoundCallbackObservable.create;
static bindNodeCallback: typeof BoundNodeCallbackObservable.create;
static combineLatest: typeof combineLatestStatic;
static concat: typeof concatStatic;
static defer: typeof DeferObservable.create;
static empty: typeof EmptyObservable.create;
static forkJoin: typeof ForkJoinObservable.create;
static from: typeof FromObservable.create;
static fromArray: typeof ArrayObservable.create;
static fromEvent: typeof FromEventObservable.create;
static fromEventPattern: typeof FromEventPatternObservable.create;
static fromPromise: typeof PromiseObservable.create;
static interval: typeof IntervalObservable.create;
static merge: typeof mergeStatic;
static never: typeof InfiniteObservable.create;
static of: typeof ArrayObservable.of;
static race: typeof raceStatic;
static range: typeof RangeObservable.create;
static throw: typeof ErrorObservable.create;
static timer: typeof TimerObservable.create;
static webSocket: typeof WebSocketSubject.create;
static zip: typeof zipStatic;
buffer: (closingNotifier: Observable<any>) => Observable<T[]>;

@@ -118,7 +144,7 @@ bufferCount: (bufferSize: number, startBufferEvery: number) => Observable<T[]>;

flatMapTo: <R>(observable: Observable<any>, projectResult?: (x: T, y: any, ix: number, iy: number) => R, concurrent?: number) => Observable<R>;
groupBy: <R>(keySelector: (value: T) => string, elementSelector?: (value: T) => R, durationSelector?: (group: GroupedObservable<R>) => Observable<any>) => Observable<GroupedObservable<R>>;
groupBy: <K, R>(keySelector: (value: T) => string, elementSelector?: (value: T) => R, durationSelector?: (group: GroupedObservable<K, R>) => Observable<any>) => Observable<GroupedObservable<K, 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>;
let: <T, R>(func: (selector: Observable<T>) => Observable<R>) => Observable<R>;
letBind: <T, R>(func: (selector: Observable<T>) => Observable<R>) => Observable<R>;
every: (predicate: (value: T, index: number) => boolean, thisArg?: any) => Observable<T>;

@@ -135,2 +161,3 @@ map: <R>(project: (x: T, ix?: number) => R, thisArg?: any) => Observable<R>;

partition: (predicate: (x: T) => boolean) => Observable<T>[];
pluck: (...properties: string[]) => Observable<any>;
publish: () => ConnectableObservable<T>;

@@ -140,2 +167,3 @@ publishBehavior: (value: any) => ConnectableObservable<T>;

publishLast: () => ConnectableObservable<T>;
race: (...observables: Array<Observable<any>>) => Observable<any>;
reduce: <R>(project: (acc: R, x: T) => R, seed?: R) => Observable<R>;

@@ -156,5 +184,3 @@ repeat: (count?: number) => Observable<T>;

switch: <R>() => Observable<R>;
exhaust: <T>() => Observable<T>;
switchMap: <R>(project: ((x: T, ix: number) => Observable<any>), projectResult?: (x: T, y: any, ix: number, iy: number) => R) => Observable<R>;
exhaustMap: <T, R, R2>(project: (x: T, ix: number) => Observable<R>, rSelector?: (x: T, y: R, ix: number, iy: number) => R2) => Observable<R>;
switchMapTo: <R>(observable: Observable<any>, projectResult?: (x: T, y: any, ix: number, iy: number) => R) => Observable<R>;

@@ -161,0 +187,0 @@ take: (count: number) => Observable<T>;

@@ -1,5 +0,4 @@

var Subscriber_1 = require('./Subscriber');
var root_1 = require('./util/root');
var SymbolShim_1 = require('./util/SymbolShim');
var rxSubscriber_1 = require('./symbol/rxSubscriber');
var toSubscriber_1 = require('./util/toSubscriber');
/**

@@ -39,10 +38,2 @@ * A representation of any set of values over any amount of time. This the most basic building block

/**
* @method Symbol.observable
* @returns {Observable} this instance of the observable
* @description an interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
*/
Observable.prototype[SymbolShim_1.SymbolShim.observable] = function () {
return this;
};
/**
* @method subscribe

@@ -59,19 +50,10 @@ * @param {Observer|Function} observerOrNext (optional) either an observer defining all functions to be called,

Observable.prototype.subscribe = function (observerOrNext, error, complete) {
var subscriber;
if (observerOrNext && typeof observerOrNext === 'object') {
if (observerOrNext instanceof Subscriber_1.Subscriber) {
subscriber = observerOrNext;
}
else if (observerOrNext[rxSubscriber_1.rxSubscriber]) {
subscriber = observerOrNext[rxSubscriber_1.rxSubscriber]();
}
else {
subscriber = new Subscriber_1.Subscriber(observerOrNext);
}
var operator = this.operator;
var subscriber = toSubscriber_1.toSubscriber(observerOrNext, error, complete);
if (operator) {
subscriber.add(this._subscribe(this.operator.call(subscriber)));
}
else {
var next = observerOrNext;
subscriber = Subscriber_1.Subscriber.create(next, error, complete);
subscriber.add(this._subscribe(subscriber));
}
subscriber.add(this._subscribe(subscriber));
return subscriber;

@@ -120,4 +102,12 @@ };

Observable.prototype._subscribe = function (subscriber) {
return this.source._subscribe(this.operator.call(subscriber));
return this.source.subscribe(subscriber);
};
/**
* @method Symbol.observable
* @returns {Observable} this instance of the observable
* @description an interop point defined by the es7-observable spec https://github.com/zenparsing/es-observable
*/
Observable.prototype[SymbolShim_1.SymbolShim.observable] = function () {
return this;
};
// HACK: Since TypeScript inherits static properties too, we have to

@@ -124,0 +114,0 @@ // fight against TypeScript here so Subject can have a different static create signature

@@ -12,5 +12,5 @@ import { Observable } from '../Observable';

subject: AsyncSubject<T>;
static create<T>(callbackFunc: Function, selector?: Function, scheduler?: Scheduler): Function;
constructor(callbackFunc: Function, selector: any, args: any[], scheduler: Scheduler);
_subscribe(subscriber: Subscriber<T | T[]>): Subscription<T>;
static create<T>(callbackFunc: Function, selector?: Function | void, scheduler?: Scheduler): (...args: any[]) => Observable<T>;
constructor(callbackFunc: Function, selector: Function, args: any[], scheduler: Scheduler);
_subscribe(subscriber: Subscriber<T | T[]>): Subscription;
}

@@ -69,4 +69,3 @@ var __extends = (this && this.__extends) || function (d, b) {

else {
subscriber.add(scheduler.schedule(dispatch, 0, { source: this, subscriber: subscriber }));
return subscriber;
return scheduler.schedule(dispatch, 0, { source: this, subscriber: subscriber });
}

@@ -78,2 +77,3 @@ };

function dispatch(state) {
var self = this;
var source = state.source, subscriber = state.subscriber;

@@ -94,6 +94,6 @@ var callbackFunc = source.callbackFunc, args = source.args, scheduler = source.scheduler;

if (result_2 === errorObject_1.errorObject) {
subject.add(scheduler.schedule(dispatchError, 0, { err: errorObject_1.errorObject.e, subject: subject }));
self.add(scheduler.schedule(dispatchError, 0, { err: errorObject_1.errorObject.e, subject: subject }));
}
else {
subject.add(scheduler.schedule(dispatchNext, 0, { value: result_2, subject: subject }));
self.add(scheduler.schedule(dispatchNext, 0, { value: result_2, subject: subject }));
}

@@ -103,3 +103,3 @@ }

var value = innerArgs.length === 1 ? innerArgs[0] : innerArgs;
subject.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
self.add(scheduler.schedule(dispatchNext, 0, { value: value, subject: subject }));
}

@@ -114,3 +114,3 @@ };

}
this.add(subject.subscribe(subscriber));
self.add(subject.subscribe(subscriber));
}

@@ -117,0 +117,0 @@ function dispatchNext(_a) {

import { Subject } from '../Subject';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';

@@ -8,8 +9,8 @@ export declare class ConnectableObservable<T> extends Observable<T> {

subject: Subject<T>;
subscription: Subscription<T>;
subscription: Subscription;
constructor(source: Observable<T>, subjectFactory: () => Subject<T>);
_subscribe(subscriber: any): Subscription<T>;
_subscribe(subscriber: Subscriber<T>): Subscription;
_getSubject(): Subject<T>;
connect(): Subscription<T>;
connect(): Subscription;
refCount(): Observable<T>;
}

@@ -7,4 +7,4 @@ var __extends = (this && this.__extends) || function (d, b) {

var Observable_1 = require('../Observable');
var Subscriber_1 = require('../Subscriber');
var Subscription_1 = require('../Subscription');
var Subscriber_1 = require('../Subscriber');
var ConnectableObservable = (function (_super) {

@@ -51,5 +51,5 @@ __extends(ConnectableObservable, _super);

var connectable = this.connectable;
connectable.subject = void 0;
connectable.subscription = void 0;
this.connectable = void 0;
connectable.subject = null;
connectable.subscription = null;
this.connectable = null;
};

@@ -104,3 +104,3 @@ return ConnectableSubscription;

obsConnection.unsubscribe();
observable.connection = void 0;
observable.connection = null;
this.unsubscribe();

@@ -119,3 +119,3 @@ }

obsConnection.unsubscribe();
observable.connection = void 0;
observable.connection = null;
}

@@ -122,0 +122,0 @@ }

import { Scheduler } from '../Scheduler';
import { Subscriber } from '../Subscriber';
import { Observable } from '../Observable';
import { Subscription } from '../Subscription';
export declare class EmptyObservable<T> extends Observable<T> {

@@ -10,3 +12,3 @@ private scheduler;

constructor(scheduler?: Scheduler);
_subscribe(subscriber: any): void;
_subscribe(subscriber: Subscriber<T>): Subscription | Function | void;
}

@@ -23,3 +23,3 @@ var __extends = (this && this.__extends) || function (d, b) {

if (scheduler) {
subscriber.add(scheduler.schedule(EmptyObservable.dispatch, 0, { subscriber: subscriber }));
return scheduler.schedule(EmptyObservable.dispatch, 0, { subscriber: subscriber });
}

@@ -26,0 +26,0 @@ else {

@@ -6,5 +6,5 @@ import { Observable } from '../Observable';

private resultSelector;
constructor(sources: Array<Observable<any> | Promise<any>>, resultSelector?: (...values: Array<any>) => any);
static create(...sources: Array<Observable<any> | Array<Observable<any>> | Promise<any> | ((...values: Array<any>) => any)>): Observable<any>;
constructor(sources: Array<Observable<any> | Promise<any>>, resultSelector?: (...values: Array<any>) => T);
static create<T>(...sources: Array<Observable<any> | Promise<any> | Array<Observable<any>> | ((...values: Array<any>) => any)>): Observable<T>;
_subscribe(subscriber: Subscriber<any>): void;
}

@@ -7,5 +7,5 @@ import { Scheduler } from '../Scheduler';

private scheduler;
constructor(ish: any, scheduler: Scheduler);
constructor(ish: Observable<T> | Promise<T> | Iterator<T> | ArrayLike<T>, scheduler: Scheduler);
static create<T>(ish: any, scheduler?: Scheduler): Observable<T>;
_subscribe(subscriber: Subscriber<T>): any;
}

@@ -6,2 +6,4 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var isArray_1 = require('../util/isArray');
var isPromise_1 = require('../util/isPromise');
var fromPromise_1 = require('./fromPromise');

@@ -13,4 +15,2 @@ var IteratorObservable_1 = require('./IteratorObservable');

var observeOn_support_1 = require('../operator/observeOn-support');
var queue_1 = require('../scheduler/queue');
var isArray = Array.isArray;
var FromObservable = (function (_super) {

@@ -24,21 +24,21 @@ __extends(FromObservable, _super);

FromObservable.create = function (ish, scheduler) {
if (scheduler === void 0) { scheduler = queue_1.queue; }
if (ish) {
if (isArray(ish)) {
if (scheduler === void 0) { scheduler = null; }
if (ish != null) {
if (typeof ish[SymbolShim_1.SymbolShim.observable] === 'function') {
if (ish instanceof Observable_1.Observable && !scheduler) {
return ish;
}
return new FromObservable(ish, scheduler);
}
if (isArray_1.isArray(ish)) {
return new fromArray_1.ArrayObservable(ish, scheduler);
}
else if (typeof ish.then === 'function') {
else if (isPromise_1.isPromise(ish)) {
return new fromPromise_1.PromiseObservable(ish, scheduler);
}
else if (typeof ish[SymbolShim_1.SymbolShim.observable] === 'function') {
if (ish instanceof Observable_1.Observable) {
return ish;
}
return new FromObservable(ish, scheduler);
}
else if (typeof ish[SymbolShim_1.SymbolShim.iterator] === 'function') {
else if (typeof ish[SymbolShim_1.SymbolShim.iterator] === 'function' || typeof ish === 'string') {
return new IteratorObservable_1.IteratorObservable(ish, null, null, scheduler);
}
}
throw new TypeError((typeof ish) + ' is not observable');
throw new TypeError((ish !== null && typeof ish || ish) + ' is not observable');
};

@@ -48,3 +48,3 @@ FromObservable.prototype._subscribe = function (subscriber) {

var scheduler = this.scheduler;
if (scheduler === queue_1.queue) {
if (scheduler == null) {
return ish[SymbolShim_1.SymbolShim.observable]().subscribe(subscriber);

@@ -51,0 +51,0 @@ }

import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
export declare class ArrayObservable<T> extends Observable<T> {

@@ -11,3 +13,3 @@ array: T[];

constructor(array: T[], scheduler?: Scheduler);
_subscribe(subscriber: any): void;
_subscribe(subscriber: Subscriber<T>): Subscription | Function | void;
}

@@ -34,3 +34,3 @@ var __extends = (this && this.__extends) || function (d, b) {

else {
scheduler = void 0;
scheduler = null;
}

@@ -67,5 +67,5 @@ var len = array.length;

if (scheduler) {
subscriber.add(scheduler.schedule(ArrayObservable.dispatch, 0, {
return scheduler.schedule(ArrayObservable.dispatch, 0, {
array: array, index: index, count: count, subscriber: subscriber
}));
});
}

@@ -72,0 +72,0 @@ else {

import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
export declare class FromEventObservable<T, R> extends Observable<T> {

@@ -9,3 +10,3 @@ private sourceObj;

private static setupSubscription<T>(sourceObj, eventName, handler, subscriber);
_subscribe(subscriber: any): void;
_subscribe(subscriber: Subscriber<T>): void;
}

@@ -47,6 +47,10 @@ var __extends = (this && this.__extends) || function (d, b) {

var selector = this.selector;
var handler = selector ? function (e) {
var result = tryCatch_1.tryCatch(selector)(e);
var handler = selector ? function () {
var args = [];
for (var _i = 0; _i < arguments.length; _i++) {
args[_i - 0] = arguments[_i];
}
var result = tryCatch_1.tryCatch(selector).apply(void 0, args);
if (result === errorObject_1.errorObject) {
subscriber.error(result.e);
subscriber.error(errorObject_1.errorObject.e);
}

@@ -53,0 +57,0 @@ else {

import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
export declare class FromEventPatternObservable<T, R> extends Observable<T> {

@@ -8,3 +9,3 @@ private addHandler;

constructor(addHandler: (handler: Function) => any, removeHandler: (handler: Function) => void, selector?: (...args: Array<any>) => T);
_subscribe(subscriber: any): void;
_subscribe(subscriber: Subscriber<T>): void;
}

@@ -0,4 +1,4 @@

import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { Scheduler } from '../Scheduler';
import { Subscription } from '../Subscription';

@@ -8,7 +8,6 @@ export declare class PromiseObservable<T> extends Observable<T> {

scheduler: Scheduler;
_isScalar: boolean;
value: T;
static create<T>(promise: Promise<T>, scheduler?: Scheduler): Observable<T>;
constructor(promise: Promise<T>, scheduler?: Scheduler);
_subscribe(subscriber: Subscriber<T>): Subscription<{}>;
_subscribe(subscriber: Subscriber<T>): Subscription | Function | void;
}

@@ -6,16 +6,14 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var root_1 = require('../util/root');
var Observable_1 = require('../Observable');
var Subscription_1 = require('../Subscription');
var queue_1 = require('../scheduler/queue');
var PromiseObservable = (function (_super) {
__extends(PromiseObservable, _super);
function PromiseObservable(promise, scheduler) {
if (scheduler === void 0) { scheduler = queue_1.queue; }
if (scheduler === void 0) { scheduler = null; }
_super.call(this);
this.promise = promise;
this.scheduler = scheduler;
this._isScalar = false;
}
PromiseObservable.create = function (promise, scheduler) {
if (scheduler === void 0) { scheduler = queue_1.queue; }
if (scheduler === void 0) { scheduler = null; }
return new PromiseObservable(promise, scheduler);

@@ -25,19 +23,27 @@ };

var _this = this;
var promise = this.promise;
var scheduler = this.scheduler;
var promise = this.promise;
if (scheduler === queue_1.queue) {
if (scheduler == null) {
if (this._isScalar) {
subscriber.next(this.value);
subscriber.complete();
if (!subscriber.isUnsubscribed) {
subscriber.next(this.value);
subscriber.complete();
}
}
else {
promise.then(function (value) {
_this.value = value;
_this._isScalar = true;
_this.value = value;
subscriber.next(value);
subscriber.complete();
}, function (err) { return subscriber.error(err); })
if (!subscriber.isUnsubscribed) {
subscriber.next(value);
subscriber.complete();
}
}, function (err) {
if (!subscriber.isUnsubscribed) {
subscriber.error(err);
}
})
.then(null, function (err) {
// escape the promise trap, throw unhandled errors
setTimeout(function () { throw err; });
root_1.root.setTimeout(function () { throw err; });
});

@@ -47,19 +53,24 @@ }

else {
var subscription = new Subscription_1.Subscription();
if (this._isScalar) {
var value = this.value;
subscription.add(scheduler.schedule(dispatchNext, 0, { value: value, subscriber: subscriber }));
if (!subscriber.isUnsubscribed) {
return scheduler.schedule(dispatchNext, 0, { value: this.value, subscriber: subscriber });
}
}
else {
promise.then(function (value) {
_this.value = value;
_this._isScalar = true;
_this.value = value;
subscription.add(scheduler.schedule(dispatchNext, 0, { value: value, subscriber: subscriber }));
}, function (err) { return subscription.add(scheduler.schedule(dispatchError, 0, { err: err, subscriber: subscriber })); })
if (!subscriber.isUnsubscribed) {
subscriber.add(scheduler.schedule(dispatchNext, 0, { value: value, subscriber: subscriber }));
}
}, function (err) {
if (!subscriber.isUnsubscribed) {
subscriber.add(scheduler.schedule(dispatchError, 0, { err: err, subscriber: subscriber }));
}
})
.then(null, function (err) {
// escape the promise trap, throw unhandled errors
scheduler.schedule(function () { throw err; });
root_1.root.setTimeout(function () { throw err; });
});
}
return subscription;
}

@@ -72,9 +83,13 @@ };

var value = _a.value, subscriber = _a.subscriber;
subscriber.next(value);
subscriber.complete();
if (!subscriber.isUnsubscribed) {
subscriber.next(value);
subscriber.complete();
}
}
function dispatchError(_a) {
var err = _a.err, subscriber = _a.subscriber;
subscriber.error(err);
if (!subscriber.isUnsubscribed) {
subscriber.error(err);
}
}
//# sourceMappingURL=fromPromise.js.map
import { Subscriber } from '../Subscriber';
import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
export declare class IntervalObservable<T> extends Observable<T> {
export declare class IntervalObservable extends Observable<number> {
private period;

@@ -10,3 +10,3 @@ private scheduler;

constructor(period?: number, scheduler?: Scheduler);
_subscribe(subscriber: Subscriber<T>): void;
_subscribe(subscriber: Subscriber<number>): void;
}
import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
import { Subscription } from '../Subscription';
import { Subscriber } from '../Subscriber';
export declare class IteratorObservable<T> extends Observable<T> {
private iterator;
static create<T>(iterator: any, project?: ((x?: any, i?: number) => T) | any, thisArg?: any | Scheduler, scheduler?: Scheduler): IteratorObservable<{}>;
static dispatch(state: any): void;
private thisArg;
private project;
private thisArg;
private scheduler;
private iterator;
static create<T>(iterator: any, project?: (x?: any, i?: number) => T, thisArg?: any, scheduler?: Scheduler): IteratorObservable<T>;
static dispatch(state: any): void;
constructor(iterator: any, project?: (x?: any, i?: number) => T, thisArg?: any, scheduler?: Scheduler);
_subscribe(subscriber: any): void;
constructor(iterator: any, project?: ((x?: any, i?: number) => T) | any, thisArg?: any | Scheduler, scheduler?: Scheduler);
_subscribe(subscriber: Subscriber<T>): Subscription | Function | void;
}

@@ -6,6 +6,8 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var root_1 = require('../util/root');
var isObject_1 = require('../util/isObject');
var tryCatch_1 = require('../util/tryCatch');
var Observable_1 = require('../Observable');
var root_1 = require('../util/root');
var isFunction_1 = require('../util/isFunction');
var SymbolShim_1 = require('../util/SymbolShim');
var tryCatch_1 = require('../util/tryCatch');
var errorObject_1 = require('../util/errorObject');

@@ -16,9 +18,15 @@ var IteratorObservable = (function (_super) {

_super.call(this);
this.project = project;
this.thisArg = thisArg;
this.scheduler = scheduler;
if (iterator == null) {
throw new Error('iterator cannot be null.');
}
if (project && typeof project !== 'function') {
if (isObject_1.isObject(project)) {
this.thisArg = project;
this.scheduler = thisArg;
}
else if (isFunction_1.isFunction(project)) {
this.project = project;
this.thisArg = thisArg;
this.scheduler = scheduler;
}
else if (project != null) {
throw new Error('When provided, `project` must be a function.');

@@ -66,5 +74,5 @@ }

if (scheduler) {
subscriber.add(scheduler.schedule(IteratorObservable.dispatch, 0, {
return scheduler.schedule(IteratorObservable.dispatch, 0, {
index: index, thisArg: thisArg, project: project, iterator: iterator, subscriber: subscriber
}));
});
}

@@ -71,0 +79,0 @@ else {

import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
export declare class InfiniteObservable<T> extends Observable<T> {
static create<T>(): InfiniteObservable<{}>;
static create<T>(): InfiniteObservable<T>;
constructor();
_subscribe(subscriber: Subscriber<T>): void;
}
import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
export declare class RangeObservable<T> extends Observable<T> {
import { Subscription } from '../Subscription';
import { Subscriber } from '../Subscriber';
export declare class RangeObservable extends Observable<number> {
static create(start?: number, end?: number, scheduler?: Scheduler): Observable<number>;

@@ -10,3 +12,3 @@ static dispatch(state: any): void;

constructor(start: number, end: number, scheduler?: Scheduler);
_subscribe(subscriber: any): void;
_subscribe(subscriber: Subscriber<number>): Subscription | Function | void;
}

@@ -40,5 +40,5 @@ var __extends = (this && this.__extends) || function (d, b) {

if (scheduler) {
subscriber.add(scheduler.schedule(RangeObservable.dispatch, 0, {
return scheduler.schedule(RangeObservable.dispatch, 0, {
index: index, end: end, start: start, subscriber: subscriber
}));
});
}

@@ -45,0 +45,0 @@ else {

import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
export declare class ScalarObservable<T> extends Observable<T> {

@@ -11,3 +12,3 @@ value: T;

constructor(value: T, scheduler?: Scheduler);
_subscribe(subscriber: Subscriber<T>): void;
_subscribe(subscriber: Subscriber<T>): Subscription | Function | void;
}

@@ -7,6 +7,2 @@ var __extends = (this && this.__extends) || function (d, b) {

var Observable_1 = require('../Observable');
var tryCatch_1 = require('../util/tryCatch');
var errorObject_1 = require('../util/errorObject');
var throw_1 = require('./throw');
var empty_1 = require('./empty');
var ScalarObservable = (function (_super) {

@@ -40,5 +36,5 @@ __extends(ScalarObservable, _super);

if (scheduler) {
subscriber.add(scheduler.schedule(ScalarObservable.dispatch, 0, {
return scheduler.schedule(ScalarObservable.dispatch, 0, {
done: false, value: value, subscriber: subscriber
}));
});
}

@@ -55,66 +51,2 @@ else {

exports.ScalarObservable = ScalarObservable;
// TypeScript is weird about class prototype member functions and instance properties touching on it's plate.
var proto = ScalarObservable.prototype;
proto.map = function (project, thisArg) {
var result = tryCatch_1.tryCatch(project).call(thisArg || this, this.value, 0);
if (result === errorObject_1.errorObject) {
return new throw_1.ErrorObservable(errorObject_1.errorObject.e);
}
else {
return new ScalarObservable(project.call(thisArg || this, this.value, 0));
}
};
proto.filter = function (select, thisArg) {
var result = tryCatch_1.tryCatch(select).call(thisArg || this, this.value, 0);
if (result === errorObject_1.errorObject) {
return new throw_1.ErrorObservable(errorObject_1.errorObject.e);
}
else if (result) {
return this;
}
else {
return new empty_1.EmptyObservable();
}
};
proto.reduce = function (project, seed) {
if (typeof seed === 'undefined') {
return this;
}
var result = tryCatch_1.tryCatch(project)(seed, this.value);
if (result === errorObject_1.errorObject) {
return new throw_1.ErrorObservable(errorObject_1.errorObject.e);
}
else {
return new ScalarObservable(result);
}
};
proto.scan = function (project, acc) {
return this.reduce(project, acc);
};
proto.count = function (predicate) {
if (!predicate) {
return new ScalarObservable(1);
}
else {
var result = tryCatch_1.tryCatch(predicate).call(this, this.value, 0, this);
if (result === errorObject_1.errorObject) {
return new throw_1.ErrorObservable(errorObject_1.errorObject.e);
}
else {
return new ScalarObservable(result ? 1 : 0);
}
}
};
proto.skip = function (count) {
if (count > 0) {
return new empty_1.EmptyObservable();
}
return this;
};
proto.take = function (count) {
if (count > 0) {
return this;
}
return new empty_1.EmptyObservable();
};
//# sourceMappingURL=ScalarObservable.js.map

@@ -13,5 +13,5 @@ import { Scheduler } from '../Scheduler';

subscriber: any;
}): Subscription<T>;
}): Subscription;
constructor(source: Observable<T>, delayTime?: number, scheduler?: Scheduler);
_subscribe(subscriber: Subscriber<T>): void;
_subscribe(subscriber: Subscriber<T>): Subscription;
}

@@ -38,5 +38,5 @@ var __extends = (this && this.__extends) || function (d, b) {

var scheduler = this.scheduler;
subscriber.add(scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
return scheduler.schedule(SubscribeOnObservable.dispatch, delay, {
source: source, subscriber: subscriber
}));
});
};

@@ -43,0 +43,0 @@ return SubscribeOnObservable;

import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
export declare class ErrorObservable<T> extends Observable<T> {
error: T;
import { Subscription } from '../Subscription';
export declare class ErrorObservable extends Observable<any> {
error: any;
private scheduler;
static create<T>(error: T, scheduler?: Scheduler): ErrorObservable<T>;
static create<T>(error: any, scheduler?: Scheduler): ErrorObservable;
static dispatch({error, subscriber}: {

@@ -11,4 +12,4 @@ error: any;

}): void;
constructor(error: T, scheduler?: Scheduler);
_subscribe(subscriber: any): void;
constructor(error: any, scheduler?: Scheduler);
_subscribe(subscriber: any): Subscription | Function | void;
}

@@ -25,5 +25,5 @@ var __extends = (this && this.__extends) || function (d, b) {

if (scheduler) {
subscriber.add(scheduler.schedule(ErrorObservable.dispatch, 0, {
return scheduler.schedule(ErrorObservable.dispatch, 0, {
error: error, subscriber: subscriber
}));
});
}

@@ -30,0 +30,0 @@ else {

import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
export declare class TimerObservable<T> extends Observable<T> {
import { Subscription } from '../Subscription';
import { Subscriber } from '../Subscriber';
export declare class TimerObservable extends Observable<number> {
static create(dueTime?: number | Date, period?: number | Scheduler, scheduler?: Scheduler): Observable<number>;
static dispatch(state: any): any;
private period;
private dueTime;
private scheduler;
static create(dueTime?: number | Date, period?: number | Scheduler, scheduler?: Scheduler): Observable<number>;
static dispatch(state: any): void;
_period: number;
private dueTime;
constructor(dueTime?: number | Date, period?: number | Scheduler, scheduler?: Scheduler);
_subscribe(subscriber: any): void;
_subscribe(subscriber: Subscriber<number>): Subscription | Function | void;
}

@@ -16,7 +16,6 @@ var __extends = (this && this.__extends) || function (d, b) {

_super.call(this);
this.period = period;
this.scheduler = scheduler;
this.period = -1;
this.dueTime = 0;
if (isNumeric_1.isNumeric(period)) {
this._period = Number(period) < 1 && 1 || Number(period);
this.period = Number(period) < 1 && 1 || Number(period);
}

@@ -30,4 +29,5 @@ else if (isScheduler_1.isScheduler(period)) {

this.scheduler = scheduler;
var absoluteDueTime = isDate_1.isDate(dueTime);
this.dueTime = absoluteDueTime ? (+dueTime - this.scheduler.now()) : dueTime;
this.dueTime = isDate_1.isDate(dueTime) ?
(+dueTime - this.scheduler.now()) :
dueTime;
}

@@ -42,25 +42,17 @@ TimerObservable.create = function (dueTime, period, scheduler) {

subscriber.next(index);
if (typeof period === 'undefined') {
subscriber.complete();
if (subscriber.isUnsubscribed) {
return;
}
else if (subscriber.isUnsubscribed) {
return;
else if (period === -1) {
return subscriber.complete();
}
if (typeof action.delay === 'undefined') {
action.add(action.scheduler.schedule(TimerObservable.dispatch, period, {
index: index + 1, period: period, subscriber: subscriber
}));
}
else {
state.index = index + 1;
action.schedule(state, period);
}
state.index = index + 1;
action.schedule(state, period);
};
TimerObservable.prototype._subscribe = function (subscriber) {
var index = 0;
var period = this._period;
var dueTime = this.dueTime;
var scheduler = this.scheduler;
subscriber.add(scheduler.schedule(TimerObservable.dispatch, dueTime, { index: index, period: period, subscriber: subscriber }));
var _a = this, period = _a.period, dueTime = _a.dueTime, scheduler = _a.scheduler;
return scheduler.schedule(TimerObservable.dispatch, dueTime, {
index: index, period: period, subscriber: subscriber
});
};

@@ -67,0 +59,0 @@ return TimerObservable;

export interface Observer<T> {
next?: (value: T) => void;
error?: (err?: any) => void;
complete?: () => void;
isUnsubscribed?: boolean;
isUnsubscribed: boolean;
next(value: T): void;
error(error: any): void;
complete(): void;
}
export declare const empty: Observer<any>;

@@ -0,1 +1,7 @@

exports.empty = {
isUnsubscribed: true,
next: function (value) { },
error: function (err) { throw err; },
complete: function () { }
};
//# sourceMappingURL=Observer.js.map

@@ -1,6 +0,4 @@

import { Observer } from './Observer';
import { Subscriber } from './Subscriber';
export interface Operator<T, R> {
export declare class Operator<T, R> {
call<T, R>(subscriber: Subscriber<R>): Subscriber<T>;
}
export declare function defaultCallFn<T, R>(observer: Observer<R>): Observer<T>;
var Subscriber_1 = require('./Subscriber');
function defaultCallFn(observer) {
return new Subscriber_1.Subscriber(observer);
}
exports.defaultCallFn = defaultCallFn;
var Operator = (function () {
function Operator() {
}
Operator.prototype.call = function (subscriber) {
return new Subscriber_1.Subscriber(subscriber);
};
return Operator;
})();
exports.Operator = Operator;
//# sourceMappingURL=Operator.js.map
import { Observable } from '../Observable';
/**
* buffers the incoming observable values until the passed `closingNotifier` emits a value, at which point
* it emits the buffer on the returned observable and starts a new buffer internally, awaiting the
* next time `closingNotifier` emits
* Buffers the incoming observable values until the passed `closingNotifier`
* emits a value, at which point it emits the buffer on the returned observable
* and starts a new buffer internally, awaiting the next time `closingNotifier`
* emits.
*
* @param {Observable<any>} closingNotifier an observable, that signals the buffer to be emitted} from the returned observable
* @returns {Observable<T[]>} an observable of buffers, which are arrays of values
* <img src="./img/buffer.png" width="100%">
*
* @param {Observable<any>} closingNotifier an Observable that signals the
* buffer to be emitted} from the returned observable.
* @returns {Observable<T[]>} an Observable of buffers, which are arrays of
* values.
*/
export declare function buffer<T>(closingNotifier: Observable<any>): Observable<T[]>;

@@ -6,10 +6,16 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var Subscriber_1 = require('../Subscriber');
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
/**
* buffers the incoming observable values until the passed `closingNotifier` emits a value, at which point
* it emits the buffer on the returned observable and starts a new buffer internally, awaiting the
* next time `closingNotifier` emits
* Buffers the incoming observable values until the passed `closingNotifier`
* emits a value, at which point it emits the buffer on the returned observable
* and starts a new buffer internally, awaiting the next time `closingNotifier`
* emits.
*
* @param {Observable<any>} closingNotifier an observable, that signals the buffer to be emitted} from the returned observable
* @returns {Observable<T[]>} an observable of buffers, which are arrays of values
* <img src="./img/buffer.png" width="100%">
*
* @param {Observable<any>} closingNotifier an Observable that signals the
* buffer to be emitted} from the returned observable.
* @returns {Observable<T[]>} an Observable of buffers, which are arrays of
* values.
*/

@@ -34,5 +40,3 @@ function buffer(closingNotifier) {

this.buffer = [];
this.notifierSubscriber = null;
this.notifierSubscriber = new BufferClosingNotifierSubscriber(this);
this.add(closingNotifier._subscribe(this.notifierSubscriber));
this.add(subscribeToResult_1.subscribeToResult(this, closingNotifier));
}

@@ -42,35 +46,9 @@ BufferSubscriber.prototype._next = function (value) {

};
BufferSubscriber.prototype._error = function (err) {
this.destination.error(err);
};
BufferSubscriber.prototype._complete = function () {
this.destination.complete();
};
BufferSubscriber.prototype.flushBuffer = function () {
BufferSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
var buffer = this.buffer;
this.buffer = [];
this.destination.next(buffer);
if (this.isUnsubscribed) {
this.notifierSubscriber.unsubscribe();
}
};
return BufferSubscriber;
})(Subscriber_1.Subscriber);
var BufferClosingNotifierSubscriber = (function (_super) {
__extends(BufferClosingNotifierSubscriber, _super);
function BufferClosingNotifierSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
}
BufferClosingNotifierSubscriber.prototype._next = function (value) {
this.parent.flushBuffer();
};
BufferClosingNotifierSubscriber.prototype._error = function (err) {
this.parent.error(err);
};
BufferClosingNotifierSubscriber.prototype._complete = function () {
this.parent.complete();
};
return BufferClosingNotifierSubscriber;
})(Subscriber_1.Subscriber);
})(OuterSubscriber_1.OuterSubscriber);
//# sourceMappingURL=buffer.js.map
import { Observable } from '../Observable';
/**
* buffers a number of values from the source observable by `bufferSize` then emits the buffer and clears it, and starts a
* new buffer each `startBufferEvery` values. If `startBufferEvery` is not provided or is `null`, then new buffers are
* started immediately at the start of the source and when each buffer closes and is emitted.
* Buffers a number of values from the source observable by `bufferSize` then
* emits the buffer and clears it, and starts a new buffer each
* `startBufferEvery` values. If `startBufferEvery` is not provided or is
* `null`, then new buffers are started immediately at the start of the source
* and when each buffer closes and is emitted.
*
* <img src="./img/bufferCount.png" width="100%">
*
* @param {number} bufferSize the maximum size of the buffer emitted.
* @param {number} [startBufferEvery] optional interval at which to start a new buffer. (e.g. if `startBufferEvery` is `2`,asdf then a
* new buffer will be started on every other value from the source.) A new buffer is started at the beginning of the source by default.
* @returns {Observable<T[]>} an observable of arrays of buffered values.
* @param {number} [startBufferEvery] optional interval at which to start a new
* buffer. (e.g. if `startBufferEvery` is `2`, then a new buffer will be started
* on every other value from the source.) A new buffer is started at the
* beginning of the source by default.
* @returns {Observable<T[]>} an Observable of arrays of buffered values.
*/
export declare function bufferCount<T>(bufferSize: number, startBufferEvery?: number): Observable<T[]>;

@@ -8,9 +8,16 @@ var __extends = (this && this.__extends) || function (d, b) {

/**
* buffers a number of values from the source observable by `bufferSize` then emits the buffer and clears it, and starts a
* new buffer each `startBufferEvery` values. If `startBufferEvery` is not provided or is `null`, then new buffers are
* started immediately at the start of the source and when each buffer closes and is emitted.
* Buffers a number of values from the source observable by `bufferSize` then
* emits the buffer and clears it, and starts a new buffer each
* `startBufferEvery` values. If `startBufferEvery` is not provided or is
* `null`, then new buffers are started immediately at the start of the source
* and when each buffer closes and is emitted.
*
* <img src="./img/bufferCount.png" width="100%">
*
* @param {number} bufferSize the maximum size of the buffer emitted.
* @param {number} [startBufferEvery] optional interval at which to start a new buffer. (e.g. if `startBufferEvery` is `2`,asdf then a
* new buffer will be started on every other value from the source.) A new buffer is started at the beginning of the source by default.
* @returns {Observable<T[]>} an observable of arrays of buffered values.
* @param {number} [startBufferEvery] optional interval at which to start a new
* buffer. (e.g. if `startBufferEvery` is `2`, then a new buffer will be started
* on every other value from the source.) A new buffer is started at the
* beginning of the source by default.
* @returns {Observable<T[]>} an Observable of arrays of buffered values.
*/

@@ -64,5 +71,2 @@ function bufferCount(bufferSize, startBufferEvery) {

};
BufferCountSubscriber.prototype._error = function (err) {
this.destination.error(err);
};
BufferCountSubscriber.prototype._complete = function () {

@@ -77,3 +81,3 @@ var destination = this.destination;

}
destination.complete();
_super.prototype._complete.call(this);
};

@@ -80,0 +84,0 @@ return BufferCountSubscriber;

import { Observable } from '../Observable';
import { Scheduler } from '../Scheduler';
/**
* buffers values from the source for a specific time period. Optionally allows new buffers to be set up at an interval.
* @param {number} the amount of time to fill each buffer for before emitting them and clearing them.
* @param {number} [bufferCreationInterval] the interval at which to start new buffers.
* @param {Scheduler} [scheduler] (optional, defaults to `asap` scheduler) The scheduler on which to schedule the
* intervals that determine buffer boundaries.
* Buffers values from the source for a specific time period. Optionally allows
* new buffers to be set up at an interval.
*
* <img src="./img/bufferTime.png" width="100%">
*
* @param {number} bufferTimeSpan the amount of time to fill each buffer for
* before emitting them and clearing them.
* @param {number} [bufferCreationInterval] the interval at which to start new
* buffers.
* @param {Scheduler} [scheduler] (optional, defaults to `asap` scheduler) The
* scheduler on which to schedule the intervals that determine buffer
* boundaries.
* @returns {Observable<T[]>} an observable of arrays of buffered values.
*/
export declare function bufferTime<T>(bufferTimeSpan: number, bufferCreationInterval?: number, scheduler?: Scheduler): Observable<T[]>;

@@ -9,7 +9,14 @@ var __extends = (this && this.__extends) || function (d, b) {

/**
* buffers values from the source for a specific time period. Optionally allows new buffers to be set up at an interval.
* @param {number} the amount of time to fill each buffer for before emitting them and clearing them.
* @param {number} [bufferCreationInterval] the interval at which to start new buffers.
* @param {Scheduler} [scheduler] (optional, defaults to `asap` scheduler) The scheduler on which to schedule the
* intervals that determine buffer boundaries.
* Buffers values from the source for a specific time period. Optionally allows
* new buffers to be set up at an interval.
*
* <img src="./img/bufferTime.png" width="100%">
*
* @param {number} bufferTimeSpan the amount of time to fill each buffer for
* before emitting them and clearing them.
* @param {number} [bufferCreationInterval] the interval at which to start new
* buffers.
* @param {Scheduler} [scheduler] (optional, defaults to `asap` scheduler) The
* scheduler on which to schedule the intervals that determine buffer
* boundaries.
* @returns {Observable<T[]>} an observable of arrays of buffered values.

@@ -63,11 +70,14 @@ */

this.buffers.length = 0;
this.destination.error(err);
_super.prototype._error.call(this, err);
};
BufferTimeSubscriber.prototype._complete = function () {
var buffers = this.buffers;
var _a = this, buffers = _a.buffers, destination = _a.destination;
while (buffers.length > 0) {
this.destination.next(buffers.shift());
destination.next(buffers.shift());
}
this.destination.complete();
_super.prototype._complete.call(this);
};
BufferTimeSubscriber.prototype._unsubscribe = function () {
this.buffers = null;
};
BufferTimeSubscriber.prototype.openBuffer = function () {

@@ -74,0 +84,0 @@ var buffer = [];

import { Observable } from '../Observable';
/**
* buffers values from the source by opening the buffer via signals from an observable provided to `openings`, and closing
* and sending the buffers when an observable returned by the `closingSelector` emits.
* @param {Observable<O>} openings An observable of notifications to start new buffers
* @param {Function} an function, that takes the value emitted by the `openings` observable and returns an Observable, which,
* when it emits, signals that the associated buffer should be emitted and cleared.
* Buffers values from the source by opening the buffer via signals from an
* Observable provided to `openings`, and closing and sending the buffers when
* an Observable returned by the `closingSelector` emits.
*
* <img src="./img/bufferToggle.png" width="100%">
*
* @param {Observable<O>} openings An observable of notifications to start new
* buffers.
* @param {Function} closingSelector a function that takes the value emitted by
* the `openings` observable and returns an Observable, which, when it emits,
* signals that the associated buffer should be emitted and cleared.
* @returns {Observable<T[]>} an observable of arrays of buffered values.
*/
export declare function bufferToggle<T, O>(openings: Observable<O>, closingSelector: (openValue: O) => Observable<any>): Observable<T[]>;
export declare function bufferToggle<T, O>(openings: Observable<O>, closingSelector: (value: O) => Observable<any>): Observable<T[]>;

@@ -11,7 +11,13 @@ var __extends = (this && this.__extends) || function (d, b) {

/**
* buffers values from the source by opening the buffer via signals from an observable provided to `openings`, and closing
* and sending the buffers when an observable returned by the `closingSelector` emits.
* @param {Observable<O>} openings An observable of notifications to start new buffers
* @param {Function} an function, that takes the value emitted by the `openings` observable and returns an Observable, which,
* when it emits, signals that the associated buffer should be emitted and cleared.
* Buffers values from the source by opening the buffer via signals from an
* Observable provided to `openings`, and closing and sending the buffers when
* an Observable returned by the `closingSelector` emits.
*
* <img src="./img/bufferToggle.png" width="100%">
*
* @param {Observable<O>} openings An observable of notifications to start new
* buffers.
* @param {Function} closingSelector a function that takes the value emitted by
* the `openings` observable and returns an Observable, which, when it emits,
* signals that the associated buffer should be emitted and cleared.
* @returns {Observable<T[]>} an observable of arrays of buffered values.

@@ -40,3 +46,3 @@ */

this.contexts = [];
this.add(this.openings._subscribe(new BufferToggleOpeningsSubscriber(this)));
this.add(this.openings.subscribe(new BufferToggleOpeningsSubscriber(this)));
}

@@ -59,3 +65,3 @@ BufferToggleSubscriber.prototype._next = function (value) {

this.contexts = null;
this.destination.error(err);
_super.prototype._error.call(this, err);
};

@@ -72,3 +78,3 @@ BufferToggleSubscriber.prototype._complete = function () {

this.contexts = null;
this.destination.complete();
_super.prototype._complete.call(this);
};

@@ -80,3 +86,3 @@ BufferToggleSubscriber.prototype.openBuffer = function (value) {

if (closingNotifier === errorObject_1.errorObject) {
this._error(closingNotifier.e);
this._error(errorObject_1.errorObject.e);
}

@@ -90,3 +96,3 @@ else {

var subscriber = new BufferToggleClosingsSubscriber(this, context);
var subscription = closingNotifier._subscribe(subscriber);
var subscription = closingNotifier.subscribe(subscriber);
context.subscription.add(subscription);

@@ -93,0 +99,0 @@ this.add(subscription);

import { Observable } from '../Observable';
/**
* Opens a buffer immediately, then closes the buffer when the observable returned by calling `closingSelector` emits a value.
* It that immediately opens a new buffer and repeats the process
* @param {function} a function that takes no arguments and returns an Observable that signals buffer closure
* Opens a buffer immediately, then closes the buffer when the observable
* returned by calling `closingSelector` emits a value. It that immediately
* opens a new buffer and repeats the process.
*
* <img src="./img/bufferWhen.png" width="100%">
*
* @param {function} closingSelector a function that takes no arguments and
* returns an Observable that signals buffer closure.
* @returns {Observable<T[]>} an observable of arrays of buffered values.
*/
export declare function bufferWhen<T>(closingSelector: () => Observable<any>): Observable<T[]>;

@@ -6,9 +6,16 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var Subscriber_1 = require('../Subscriber');
var Subscription_1 = require('../Subscription');
var tryCatch_1 = require('../util/tryCatch');
var errorObject_1 = require('../util/errorObject');
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
/**
* Opens a buffer immediately, then closes the buffer when the observable returned by calling `closingSelector` emits a value.
* It that immediately opens a new buffer and repeats the process
* @param {function} a function that takes no arguments and returns an Observable that signals buffer closure
* Opens a buffer immediately, then closes the buffer when the observable
* returned by calling `closingSelector` emits a value. It that immediately
* opens a new buffer and repeats the process.
*
* <img src="./img/bufferWhen.png" width="100%">
*
* @param {function} closingSelector a function that takes no arguments and
* returns an Observable that signals buffer closure.
* @returns {Observable<T[]>} an observable of arrays of buffered values.

@@ -34,2 +41,3 @@ */

this.closingSelector = closingSelector;
this.subscribing = false;
this.openBuffer();

@@ -40,20 +48,32 @@ }

};
BufferWhenSubscriber.prototype._error = function (err) {
this.buffer = null;
this.destination.error(err);
};
BufferWhenSubscriber.prototype._complete = function () {
var buffer = this.buffer;
this.destination.next(buffer);
if (buffer) {
this.destination.next(buffer);
}
_super.prototype._complete.call(this);
};
BufferWhenSubscriber.prototype._unsubscribe = function () {
this.buffer = null;
this.destination.complete();
this.subscribing = false;
};
BufferWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
this.openBuffer();
};
BufferWhenSubscriber.prototype.notifyComplete = function () {
if (this.subscribing) {
this.complete();
}
else {
this.openBuffer();
}
};
BufferWhenSubscriber.prototype.openBuffer = function () {
var prevClosingNotification = this.closingNotification;
if (prevClosingNotification) {
this.remove(prevClosingNotification);
prevClosingNotification.unsubscribe();
var closingSubscription = this.closingSubscription;
if (closingSubscription) {
this.remove(closingSubscription);
closingSubscription.unsubscribe();
}
var buffer = this.buffer;
if (buffer) {
if (this.buffer) {
this.destination.next(buffer);

@@ -64,29 +84,15 @@ }

if (closingNotifier === errorObject_1.errorObject) {
var err = closingNotifier.e;
this.buffer = null;
this.destination.error(err);
this.error(errorObject_1.errorObject.e);
}
else {
this.add(this.closingNotification = closingNotifier._subscribe(new BufferClosingNotifierSubscriber(this)));
closingSubscription = new Subscription_1.Subscription();
this.closingSubscription = closingSubscription;
this.add(closingSubscription);
this.subscribing = true;
closingSubscription.add(subscribeToResult_1.subscribeToResult(this, closingNotifier));
this.subscribing = false;
}
};
return BufferWhenSubscriber;
})(Subscriber_1.Subscriber);
var BufferClosingNotifierSubscriber = (function (_super) {
__extends(BufferClosingNotifierSubscriber, _super);
function BufferClosingNotifierSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
}
BufferClosingNotifierSubscriber.prototype._next = function () {
this.parent.openBuffer();
};
BufferClosingNotifierSubscriber.prototype._error = function (err) {
this.parent.error(err);
};
BufferClosingNotifierSubscriber.prototype._complete = function () {
this.parent.openBuffer();
};
return BufferClosingNotifierSubscriber;
})(Subscriber_1.Subscriber);
})(OuterSubscriber_1.OuterSubscriber);
//# sourceMappingURL=bufferWhen.js.map

@@ -10,2 +10,2 @@ import { Observable } from '../Observable';

*/
export declare function _catch<T>(selector: (err: any, caught: Observable<any>) => Observable<any>): Observable<T>;
export declare function _catch<T, R>(selector: (err: any, caught: Observable<T>) => Observable<R>): Observable<R>;

@@ -18,6 +18,5 @@ var __extends = (this && this.__extends) || function (d, b) {

function _catch(selector) {
var catchOperator = new CatchOperator(selector);
var caught = this.lift(catchOperator);
catchOperator.caught = caught;
return caught;
var operator = new CatchOperator(selector);
var caught = this.lift(operator);
return (operator.caught = caught);
}

@@ -37,31 +36,22 @@ exports._catch = _catch;

function CatchSubscriber(destination, selector, caught) {
_super.call(this, null);
this.destination = destination;
_super.call(this, destination);
this.selector = selector;
this.caught = caught;
this.lastSubscription = this;
this.destination.add(this);
}
CatchSubscriber.prototype._next = function (value) {
this.destination.next(value);
};
CatchSubscriber.prototype._error = function (err) {
var result = tryCatch_1.tryCatch(this.selector)(err, this.caught);
if (result === errorObject_1.errorObject) {
this.destination.error(errorObject_1.errorObject.e);
CatchSubscriber.prototype.error = function (err) {
if (!this.isStopped) {
var result = tryCatch_1.tryCatch(this.selector)(err, this.caught);
if (result === errorObject_1.errorObject) {
_super.prototype.error.call(this, errorObject_1.errorObject.e);
}
else {
var destination = this.destination;
this.unsubscribe();
destination.remove(this);
result.subscribe(this.destination);
}
}
else {
this.lastSubscription.unsubscribe();
this.lastSubscription = result.subscribe(this.destination);
}
};
CatchSubscriber.prototype._complete = function () {
this.lastSubscription.unsubscribe();
this.destination.complete();
};
CatchSubscriber.prototype._unsubscribe = function () {
this.lastSubscription.unsubscribe();
};
return CatchSubscriber;
})(Subscriber_1.Subscriber);
//# sourceMappingURL=catch.js.map

@@ -0,1 +1,2 @@

import { Observable } from '../Observable';
/**

@@ -13,2 +14,2 @@ * Takes an Observable of Observables, and collects all observables from it. Once the outer observable

*/
export declare function combineAll<T, R>(project?: (...values: Array<any>) => R): any;
export declare function combineAll<T, R>(project?: (...values: Array<any>) => R): Observable<R>;

@@ -13,2 +13,2 @@ import { Observable } from '../Observable';

*/
export declare function combineLatest<R>(...observables: Array<Observable<any> | Array<Observable<any>> | ((...values: Array<any>) => R) | Scheduler>): Observable<R>;
export declare function combineLatest<T, R>(...observables: Array<any | Observable<any> | Array<Observable<any>> | (((...values: Array<any>) => R)) | Scheduler>): Observable<R>;

@@ -16,6 +16,6 @@ import { Operator } from '../Operator';

constructor(destination: Subscriber<R>, project?: (...values: Array<any>) => R);
_next(observable: any): void;
_complete(): void;
protected _next(observable: any): void;
protected _complete(): void;
notifyComplete(unused: Subscriber<R>): void;
notifyNext(observable: any, value: R, outerIndex: number, innerIndex: number): void;
}

@@ -12,2 +12,2 @@ import { Observable } from '../Observable';

*/
export declare function combineLatest<R>(...observables: Array<Observable<any> | Array<Observable<any>> | ((...values: Array<any>) => R)>): Observable<R>;
export declare function combineLatest<T, R>(...observables: Array<Observable<any> | Array<Observable<any>> | ((...values: Array<any>) => R)>): Observable<R>;

@@ -10,2 +10,2 @@ import { Observable } from '../Observable';

*/
export declare function concat<R>(...observables: Array<Observable<any> | Scheduler>): Observable<R>;
export declare function concat<T, R>(...observables: Array<Observable<any> | Scheduler>): Observable<R>;

@@ -1,2 +0,1 @@

var queue_1 = require('../scheduler/queue');
var mergeAll_support_1 = require('./mergeAll-support');

@@ -17,3 +16,3 @@ var fromArray_1 = require('../observable/fromArray');

}
var scheduler = queue_1.queue;
var scheduler = null;
var args = observables;

@@ -20,0 +19,0 @@ if (isScheduler_1.isScheduler(args[observables.length - 1])) {

@@ -11,2 +11,2 @@ import { Observable } from '../Observable';

*/
export declare function concat<R>(...observables: (Observable<any> | Scheduler)[]): Observable<R>;
export declare function concat<T, R>(...observables: Array<Observable<any> | Scheduler>): Observable<R>;

@@ -1,2 +0,1 @@

import { Observable } from '../Observable';
/**

@@ -13,2 +12,2 @@ * Joins every Observable emitted by the source (an Observable of Observables), in a serial

*/
export declare function concatAll<T>(): Observable<T>;
export declare function concatAll<T>(): T;

@@ -12,3 +12,3 @@ import { Observable } from '../Observable';

* the `value` and the `index` as arguments.
* @param {function} [projectResult] an optional result selector that is applied to values before they're
* @param {function} [resultSelector] an optional result selector that is applied to values before they're
* merged into the returned observable. The arguments passed to this function are:

@@ -22,2 +22,2 @@ * - `outerValue`: the value that came from the source

*/
export declare function concatMap<T, R>(project: (value: T, index: number) => Observable<any>, projectResult?: (outerValue: T, innerValue: any, outerIndex: number, innerIndex: number) => R): any;
export declare function concatMap<T, R, R2>(project: (value: T, index: number) => Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2): any;

@@ -12,3 +12,3 @@ var mergeMap_support_1 = require('./mergeMap-support');

* the `value` and the `index` as arguments.
* @param {function} [projectResult] an optional result selector that is applied to values before they're
* @param {function} [resultSelector] an optional result selector that is applied to values before they're
* merged into the returned observable. The arguments passed to this function are:

@@ -22,6 +22,6 @@ * - `outerValue`: the value that came from the source

*/
function concatMap(project, projectResult) {
return this.lift(new mergeMap_support_1.MergeMapOperator(project, projectResult, 1));
function concatMap(project, resultSelector) {
return this.lift(new mergeMap_support_1.MergeMapOperator(project, resultSelector, 1));
}
exports.concatMap = concatMap;
//# sourceMappingURL=concatMap.js.map

@@ -6,3 +6,3 @@ import { Observable } from '../Observable';

* @param {Observable} observable the observable to map each source value to
* @param {function} [projectResult] an optional result selector that is applied to values before they're
* @param {function} [resultSelector] an optional result selector that is applied to values before they're
* merged into the returned observable. The arguments passed to this function are:

@@ -16,2 +16,2 @@ * - `outerValue`: the value that came from the source

*/
export declare function concatMapTo<T, R, R2>(observable: Observable<R>, projectResult?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2): Observable<R2>;
export declare function concatMapTo<T, R, R2>(observable: Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2): Observable<R2>;

@@ -6,3 +6,3 @@ var mergeMapTo_support_1 = require('./mergeMapTo-support');

* @param {Observable} observable the observable to map each source value to
* @param {function} [projectResult] an optional result selector that is applied to values before they're
* @param {function} [resultSelector] an optional result selector that is applied to values before they're
* merged into the returned observable. The arguments passed to this function are:

@@ -16,6 +16,6 @@ * - `outerValue`: the value that came from the source

*/
function concatMapTo(observable, projectResult) {
return this.lift(new mergeMapTo_support_1.MergeMapToOperator(observable, projectResult, 1));
function concatMapTo(observable, resultSelector) {
return this.lift(new mergeMapTo_support_1.MergeMapToOperator(observable, resultSelector, 1));
}
exports.concatMapTo = concatMapTo;
//# sourceMappingURL=concatMapTo.js.map
import { Observable } from '../Observable';
export declare function debounce<T>(durationSelector: (value: T) => Observable<any> | Promise<any>): Observable<T>;
/**
* Returns the source Observable delayed by the computed debounce duration,
* with the duration lengthened if a new source item arrives before the delay
* duration ends.
* In practice, for each item emitted on the source, this operator holds the
* latest item, waits for a silence as long as the `durationSelector` specifies,
* and only then emits the latest source item on the result Observable.
* @param {function} durationSelector function for computing the timeout duration for each item.
* @returns {Observable} an Observable the same as source Observable, but drops items.
*/
export declare function debounce<T>(durationSelector: (value: T) => Observable<number> | Promise<number>): Observable<T>;

@@ -6,7 +6,16 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var fromPromise_1 = require('../observable/fromPromise');
var Subscriber_1 = require('../Subscriber');
var tryCatch_1 = require('../util/tryCatch');
var isPromise_1 = require('../util/isPromise');
var errorObject_1 = require('../util/errorObject');
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
/**
* Returns the source Observable delayed by the computed debounce duration,
* with the duration lengthened if a new source item arrives before the delay
* duration ends.
* In practice, for each item emitted on the source, this operator holds the
* latest item, waits for a silence as long as the `durationSelector` specifies,
* and only then emits the latest source item on the result Observable.
* @param {function} durationSelector function for computing the timeout duration for each item.
* @returns {Observable} an Observable the same as source Observable, but drops items.
*/
function debounce(durationSelector) {

@@ -20,4 +29,4 @@ return this.lift(new DebounceOperator(durationSelector));

}
DebounceOperator.prototype.call = function (observer) {
return new DebounceSubscriber(observer, this.durationSelector);
DebounceOperator.prototype.call = function (subscriber) {
return new DebounceSubscriber(subscriber, this.durationSelector);
};

@@ -31,77 +40,50 @@ return DebounceOperator;

this.durationSelector = durationSelector;
this.debouncedSubscription = null;
this.lastValue = null;
this._index = 0;
this.hasValue = false;
this.durationSubscription = null;
}
Object.defineProperty(DebounceSubscriber.prototype, "index", {
get: function () {
return this._index;
},
enumerable: true,
configurable: true
});
DebounceSubscriber.prototype._next = function (value) {
var destination = this.destination;
var currentIndex = ++this._index;
var debounce = tryCatch_1.tryCatch(this.durationSelector)(value);
if (debounce === errorObject_1.errorObject) {
destination.error(errorObject_1.errorObject.e);
var subscription = this.durationSubscription;
var duration = tryCatch_1.tryCatch(this.durationSelector)(value);
if (duration === errorObject_1.errorObject) {
this.destination.error(errorObject_1.errorObject.e);
}
else {
if (isPromise_1.isPromise(debounce)) {
debounce = fromPromise_1.PromiseObservable.create(debounce);
this.value = value;
this.hasValue = true;
if (subscription) {
subscription.unsubscribe();
this.remove(subscription);
}
this.lastValue = value;
this.clearDebounce();
this.add(this.debouncedSubscription = debounce._subscribe(new DurationSelectorSubscriber(this, currentIndex)));
subscription = subscribeToResult_1.subscribeToResult(this, duration);
if (!subscription.isUnsubscribed) {
this.add(this.durationSubscription = subscription);
}
}
};
DebounceSubscriber.prototype._complete = function () {
this.debouncedNext();
this.emitValue();
this.destination.complete();
};
DebounceSubscriber.prototype.debouncedNext = function () {
this.clearDebounce();
if (this.lastValue != null) {
this.destination.next(this.lastValue);
this.lastValue = null;
}
DebounceSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
this.emitValue();
};
DebounceSubscriber.prototype.clearDebounce = function () {
var debouncedSubscription = this.debouncedSubscription;
if (debouncedSubscription) {
debouncedSubscription.unsubscribe();
this.remove(debouncedSubscription);
this.debouncedSubscription = null;
}
DebounceSubscriber.prototype.notifyComplete = function () {
this.emitValue();
};
return DebounceSubscriber;
})(Subscriber_1.Subscriber);
var DurationSelectorSubscriber = (function (_super) {
__extends(DurationSelectorSubscriber, _super);
function DurationSelectorSubscriber(parent, currentIndex) {
_super.call(this, null);
this.parent = parent;
this.currentIndex = currentIndex;
}
DurationSelectorSubscriber.prototype.debounceNext = function () {
var parent = this.parent;
if (this.currentIndex === parent.index) {
parent.debouncedNext();
if (!this.isUnsubscribed) {
this.unsubscribe();
DebounceSubscriber.prototype.emitValue = function () {
if (this.hasValue) {
var value = this.value;
var subscription = this.durationSubscription;
if (subscription) {
this.durationSubscription = null;
subscription.unsubscribe();
this.remove(subscription);
}
this.value = null;
this.hasValue = false;
_super.prototype._next.call(this, value);
}
};
DurationSelectorSubscriber.prototype._next = function (unused) {
this.debounceNext();
};
DurationSelectorSubscriber.prototype._error = function (err) {
this.parent.error(err);
};
DurationSelectorSubscriber.prototype._complete = function () {
this.debounceNext();
};
return DurationSelectorSubscriber;
})(Subscriber_1.Subscriber);
return DebounceSubscriber;
})(OuterSubscriber_1.OuterSubscriber);
//# sourceMappingURL=debounce.js.map
import { Observable } from '../Observable';
import { Scheduler } from '../Scheduler';
/**
* Returns the source Observable delayed by the computed debounce duration,
* with the duration lengthened if a new source item arrives before the delay
* duration ends.
* In practice, for each item emitted on the source, this operator holds the
* latest item, waits for a silence for the `dueTime` length, and only then
* emits the latest source item on the result Observable.
* Optionally takes a scheduler for manging timers.
* @param {number} dueTime the timeout value for the window of time required to not drop the item.
* @param {Scheduler} [scheduler] the Scheduler to use for managing the timers that handle the timeout for each item.
* @returns {Observable} an Observable the same as source Observable, but drops items.
*/
export declare function debounceTime<T>(dueTime: number, scheduler?: Scheduler): Observable<T>;

@@ -8,2 +8,14 @@ var __extends = (this && this.__extends) || function (d, b) {

var asap_1 = require('../scheduler/asap');
/**
* Returns the source Observable delayed by the computed debounce duration,
* with the duration lengthened if a new source item arrives before the delay
* duration ends.
* In practice, for each item emitted on the source, this operator holds the
* latest item, waits for a silence for the `dueTime` length, and only then
* emits the latest source item on the result Observable.
* Optionally takes a scheduler for manging timers.
* @param {number} dueTime the timeout value for the window of time required to not drop the item.
* @param {Scheduler} [scheduler] the Scheduler to use for managing the timers that handle the timeout for each item.
* @returns {Observable} an Observable the same as source Observable, but drops items.
*/
function debounceTime(dueTime, scheduler) {

@@ -32,2 +44,3 @@ if (scheduler === void 0) { scheduler = asap_1.asap; }

this.lastValue = null;
this.hasValue = false;
}

@@ -37,2 +50,3 @@ DebounceTimeSubscriber.prototype._next = function (value) {

this.lastValue = value;
this.hasValue = true;
this.add(this.debouncedSubscription = this.scheduler.schedule(dispatchNext, this.dueTime, this));

@@ -46,5 +60,6 @@ };

this.clearDebounce();
if (this.lastValue != null) {
if (this.hasValue) {
this.destination.next(this.lastValue);
this.lastValue = null;
this.hasValue = false;
}

@@ -51,0 +66,0 @@ };

import { Observable } from '../Observable';
export declare function defaultIfEmpty<T, R>(defaultValue?: R): Observable<T> | Observable<R>;
/**
* Returns an Observable that emits the elements of the source or a specified default value if empty.
* @param {any} defaultValue the default value used if source is empty; defaults to null.
* @returns {Observable} an Observable of the items emitted by the where empty values are replaced by the specified default value or null.
*/
export declare function defaultIfEmpty<T, R>(defaultValue?: R): Observable<T | R>;

@@ -7,2 +7,7 @@ var __extends = (this && this.__extends) || function (d, b) {

var Subscriber_1 = require('../Subscriber');
/**
* Returns an Observable that emits the elements of the source or a specified default value if empty.
* @param {any} defaultValue the default value used if source is empty; defaults to null.
* @returns {Observable} an Observable of the items emitted by the where empty values are replaced by the specified default value or null.
*/
function defaultIfEmpty(defaultValue) {

@@ -9,0 +14,0 @@ if (defaultValue === void 0) { defaultValue = null; }

import { Scheduler } from '../Scheduler';
export declare function delay<T>(delay: number | Date, scheduler?: Scheduler): any;
import { Observable } from '../Observable';
/**
* Returns an Observable that delays the emission of items from the source Observable
* by a given timeout or until a given Date.
* @param {number|Date} delay the timeout value or date until which the emission of the source items is delayed.
* @param {Scheduler} [scheduler] the Scheduler to use for managing the timers that handle the timeout for each item.
* @returns {Observable} an Observable that delays the emissions of the source Observable by the specified timeout or Date.
*/
export declare function delay<T>(delay: number | Date, scheduler?: Scheduler): Observable<T>;

@@ -6,10 +6,17 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var asap_1 = require('../scheduler/asap');
var isDate_1 = require('../util/isDate');
var Subscriber_1 = require('../Subscriber');
var Notification_1 = require('../Notification');
var queue_1 = require('../scheduler/queue');
var isDate_1 = require('../util/isDate');
/**
* Returns an Observable that delays the emission of items from the source Observable
* by a given timeout or until a given Date.
* @param {number|Date} delay the timeout value or date until which the emission of the source items is delayed.
* @param {Scheduler} [scheduler] the Scheduler to use for managing the timers that handle the timeout for each item.
* @returns {Observable} an Observable that delays the emissions of the source Observable by the specified timeout or Date.
*/
function delay(delay, scheduler) {
if (scheduler === void 0) { scheduler = queue_1.queue; }
if (scheduler === void 0) { scheduler = asap_1.asap; }
var absoluteDelay = isDate_1.isDate(delay);
var delayFor = absoluteDelay ? (+delay - scheduler.now()) : delay;
var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);
return this.lift(new DelayOperator(delayFor, scheduler));

@@ -16,0 +23,0 @@ }

import { Observable } from '../Observable';
/**
* Returns an Observable that transforms Notification objects into the items or notifications they represent.
* @returns {Observable} an Observable that emits items and notifications embedded in Notification objects emitted by the source Observable.
*/
export declare function dematerialize<T>(): Observable<any>;

@@ -7,2 +7,6 @@ var __extends = (this && this.__extends) || function (d, b) {

var Subscriber_1 = require('../Subscriber');
/**
* Returns an Observable that transforms Notification objects into the items or notifications they represent.
* @returns {Observable} an Observable that emits items and notifications embedded in Notification objects emitted by the source Observable.
*/
function dematerialize() {

@@ -9,0 +13,0 @@ return this.lift(new DeMaterializeOperator());

@@ -1,1 +0,10 @@

export declare function distinctUntilChanged<T>(compare?: (x: T, y: T) => boolean): any;
import { Observable } from '../Observable';
/**
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item.
* If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
* If a comparator function is not provided, an equality check is used by default.
* @param {function} [compare] optional comparison function called to test if an item is distinct from the previous item in the source.
* @returns {Observable} an Observable that emits items from the source Observable with distinct values.
*/
export declare function distinctUntilChanged<T>(compare?: (x: T, y: T) => boolean): Observable<T>;
export declare function distinctUntilChanged<T, K>(compare: (x: K, y: K) => boolean, keySelector?: (x: T) => K): Observable<T>;

@@ -9,12 +9,13 @@ var __extends = (this && this.__extends) || function (d, b) {

var errorObject_1 = require('../util/errorObject');
function distinctUntilChanged(compare) {
return this.lift(new DistinctUntilChangedOperator(compare));
function distinctUntilChanged(compare, keySelector) {
return this.lift(new DistinctUntilChangedOperator(compare, keySelector));
}
exports.distinctUntilChanged = distinctUntilChanged;
var DistinctUntilChangedOperator = (function () {
function DistinctUntilChangedOperator(compare) {
function DistinctUntilChangedOperator(compare, keySelector) {
this.compare = compare;
this.keySelector = keySelector;
}
DistinctUntilChangedOperator.prototype.call = function (subscriber) {
return new DistinctUntilChangedSubscriber(subscriber, this.compare);
return new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector);
};

@@ -25,5 +26,6 @@ return DistinctUntilChangedOperator;

__extends(DistinctUntilChangedSubscriber, _super);
function DistinctUntilChangedSubscriber(destination, compare) {
function DistinctUntilChangedSubscriber(destination, compare, keySelector) {
_super.call(this, destination);
this.hasValue = false;
this.keySelector = keySelector;
this.hasKey = false;
if (typeof compare === 'function') {

@@ -37,15 +39,22 @@ this.compare = compare;

DistinctUntilChangedSubscriber.prototype._next = function (value) {
var keySelector = this.keySelector;
var key = value;
if (keySelector) {
key = tryCatch_1.tryCatch(this.keySelector)(value);
if (key === errorObject_1.errorObject) {
return this.destination.error(errorObject_1.errorObject.e);
}
}
var result = false;
if (this.hasValue) {
result = tryCatch_1.tryCatch(this.compare)(this.value, value);
if (this.hasKey) {
result = tryCatch_1.tryCatch(this.compare)(this.key, key);
if (result === errorObject_1.errorObject) {
this.destination.error(errorObject_1.errorObject.e);
return;
return this.destination.error(errorObject_1.errorObject.e);
}
}
else {
this.hasValue = true;
this.hasKey = true;
}
if (Boolean(result) === false) {
this.value = value;
this.key = key;
this.destination.next(value);

@@ -52,0 +61,0 @@ }

@@ -1,1 +0,11 @@

export declare function distinctUntilKeyChanged<T>(key: string, compare?: (x: any, y: any) => boolean): any;
import { Observable } from '../Observable';
/**
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item,
* using a property accessed by using the key provided to check if the two items are distinct.
* If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
* If a comparator function is not provided, an equality check is used by default.
* @param {string} key string key for object property lookup on each item.
* @param {function} [compare] optional comparison function called to test if an item is distinct from the previous item in the source.
* @returns {Observable} an Observable that emits items from the source Observable with distinct values based on the key specified.
*/
export declare function distinctUntilKeyChanged<T>(key: string, compare?: (x: T, y: T) => boolean): Observable<T>;
var distinctUntilChanged_1 = require('./distinctUntilChanged');
/**
* Returns an Observable that emits all items emitted by the source Observable that are distinct by comparison from the previous item,
* using a property accessed by using the key provided to check if the two items are distinct.
* If a comparator function is provided, then it will be called for each item to test for whether or not that value should be emitted.
* If a comparator function is not provided, an equality check is used by default.
* @param {string} key string key for object property lookup on each item.
* @param {function} [compare] optional comparison function called to test if an item is distinct from the previous item in the source.
* @returns {Observable} an Observable that emits items from the source Observable with distinct values based on the key specified.
*/
function distinctUntilKeyChanged(key, compare) {

@@ -3,0 +12,0 @@ return distinctUntilChanged_1.distinctUntilChanged.call(this, function (x, y) {

import { Observer } from '../Observer';
export declare function _do<T>(nextOrObserver?: Observer<T> | ((x: T) => void), error?: (e: any) => void, complete?: () => void): any;
import { Observable } from '../Observable';
/**
* Returns a mirrored Observable of the source Observable, but modified so that the provided Observer is called
* for every item emitted by the source.
* This operator is useful for debugging your observables for the correct values or performing other side effects.
* @param {Observer|function} [nextOrObserver] a normal observer callback or callback for onNext.
* @param {function} [error] callback for errors in the source.
* @param {function} [complete] callback for the completion of the source.
* @reurns {Observable} a mirrored Observable with the specified Observer or callback attached for each item.
*/
export declare function _do<T>(nextOrObserver?: Observer<T> | ((x: T) => void), error?: (e: any) => void, complete?: () => void): Observable<T>;

@@ -10,2 +10,11 @@ var __extends = (this && this.__extends) || function (d, b) {

var errorObject_1 = require('../util/errorObject');
/**
* Returns a mirrored Observable of the source Observable, but modified so that the provided Observer is called
* for every item emitted by the source.
* This operator is useful for debugging your observables for the correct values or performing other side effects.
* @param {Observer|function} [nextOrObserver] a normal observer callback or callback for onNext.
* @param {function} [error] callback for errors in the source.
* @param {function} [complete] callback for the completion of the source.
* @reurns {Observable} a mirrored Observable with the specified Observer or callback attached for each item.
*/
function _do(nextOrObserver, error, complete) {

@@ -12,0 +21,0 @@ var next;

@@ -1,1 +0,9 @@

export declare function elementAt(index: number, defaultValue?: any): any;
import { Observable } from '../Observable';
/**
* Returns an Observable that emits the item at the specified index in the source Observable.
* If default is given, missing indices will output this value on next; otherwise, outputs error.
* @param {number} index the index of the value to be retrieved.
* @param {any} [defaultValue] the default value returned for missing indices.
* @returns {Observable} an Observable that emits a single item, if it is found. Otherwise, will emit the default value if given.
*/
export declare function elementAt<T>(index: number, defaultValue?: T): Observable<T>;

@@ -8,2 +8,9 @@ var __extends = (this && this.__extends) || function (d, b) {

var ArgumentOutOfRangeError_1 = require('../util/ArgumentOutOfRangeError');
/**
* Returns an Observable that emits the item at the specified index in the source Observable.
* If default is given, missing indices will output this value on next; otherwise, outputs error.
* @param {number} index the index of the value to be retrieved.
* @param {any} [defaultValue] the default value returned for missing indices.
* @returns {Observable} an Observable that emits a single item, if it is found. Otherwise, will emit the default value if given.
*/
function elementAt(index, defaultValue) {

@@ -10,0 +17,0 @@ return this.lift(new ElementAtOperator(index, defaultValue));

import { Observable } from '../Observable';
/**
* Returns an Observable that emits whether or not every item of the source satisfies the condition specified.
* @param {function} predicate a function for determining if an item meets a specified condition.
* @param {any} [thisArg] optional object to use for `this` in the callback
* @returns {Observable} an Observable of booleans that determines if all items of the source Observable meet the condition specified.
*/
export declare function every<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any): Observable<boolean>;

@@ -12,7 +12,12 @@ var __extends = (this && this.__extends) || function (d, b) {

var errorObject_1 = require('../util/errorObject');
/**
* Returns an Observable that emits whether or not every item of the source satisfies the condition specified.
* @param {function} predicate a function for determining if an item meets a specified condition.
* @param {any} [thisArg] optional object to use for `this` in the callback
* @returns {Observable} an Observable of booleans that determines if all items of the source Observable meet the condition specified.
*/
function every(predicate, thisArg) {
var source = this;
var result;
if (source._isScalar) {
result = tryCatch_1.tryCatch(predicate).call(thisArg || this, source.value, 0, source);
var result = tryCatch_1.tryCatch(predicate).call(thisArg || this, source.value, 0, source);
if (result === errorObject_1.errorObject) {

@@ -27,8 +32,10 @@ return new throw_1.ErrorObservable(errorObject_1.errorObject.e, source.scheduler);

var array = source.array;
var result_1 = tryCatch_1.tryCatch(function (array, predicate, thisArg) { return array.every(predicate, thisArg); })(array, predicate, thisArg);
if (result_1 === errorObject_1.errorObject) {
var result = tryCatch_1.tryCatch(function (array, predicate, thisArg) {
return array.every(predicate, thisArg);
})(array, predicate, thisArg);
if (result === errorObject_1.errorObject) {
return new throw_1.ErrorObservable(errorObject_1.errorObject.e, source.scheduler);
}
else {
return new ScalarObservable_1.ScalarObservable(result_1, source.scheduler);
return new ScalarObservable_1.ScalarObservable(result, source.scheduler);
}

@@ -35,0 +42,0 @@ }

import { Observable } from '../Observable';
/**
* Returns an Observable that takes a source of observables and propagates the first observable exclusively
* until it completes before subscribing to the next.
* Items that come in before the first has exhausted will be dropped.
* Similar to `concatAll`, but will not hold on to items that come in before the first is exhausted.
* @returns {Observable} an Observable which contains all of the items of the first Observable and following Observables in the source.
*/
export declare function exhaust<T>(): Observable<T>;

@@ -8,2 +8,9 @@ var __extends = (this && this.__extends) || function (d, b) {

var subscribeToResult_1 = require('../util/subscribeToResult');
/**
* Returns an Observable that takes a source of observables and propagates the first observable exclusively
* until it completes before subscribing to the next.
* Items that come in before the first has exhausted will be dropped.
* Similar to `concatAll`, but will not hold on to items that come in before the first is exhausted.
* @returns {Observable} an Observable which contains all of the items of the first Observable and following Observables in the source.
*/
function exhaust() {

@@ -25,4 +32,4 @@ return this.lift(new SwitchFirstOperator());

_super.call(this, destination);
this.hasCompleted = false;
this.hasSubscription = false;
this.hasCompleted = false;
}

@@ -41,8 +48,2 @@ SwitchFirstSubscriber.prototype._next = function (value) {

};
SwitchFirstSubscriber.prototype.notifyNext = function (outerValue, innerValue) {
this.destination.next(innerValue);
};
SwitchFirstSubscriber.prototype.notifyError = function (err) {
this.destination.error(err);
};
SwitchFirstSubscriber.prototype.notifyComplete = function (innerSub) {

@@ -49,0 +50,0 @@ this.remove(innerSub);

import { Observable } from '../Observable';
export declare function exhaustMap<T, R, R2>(project: (value: T, index: number) => Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2): Observable<R>;
/**
* Returns an Observable that applies the given function to each item of the source Observable
* to create a new Observable, which are then concatenated together to produce a new Observable.
* @param {function} project function called for each item of the source to produce a new Observable.
* @param {function} [resultSelector] optional function for then selecting on each inner Observable.
* @returns {Observable} an Observable containing all the projected Observables of each item of the source concatenated together.
*/
export declare function exhaustMap<T, R, R2>(project: (value: T, index: number) => Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2): Observable<R2>;

@@ -10,2 +10,9 @@ var __extends = (this && this.__extends) || function (d, b) {

var subscribeToResult_1 = require('../util/subscribeToResult');
/**
* Returns an Observable that applies the given function to each item of the source Observable
* to create a new Observable, which are then concatenated together to produce a new Observable.
* @param {function} project function called for each item of the source to produce a new Observable.
* @param {function} [resultSelector] optional function for then selecting on each inner Observable.
* @returns {Observable} an Observable containing all the projected Observables of each item of the source concatenated together.
*/
function exhaustMap(project, resultSelector) {

@@ -41,3 +48,3 @@ return this.lift(new SwitchFirstMapOperator(project, resultSelector));

if (result === errorObject_1.errorObject) {
destination.error(result.e);
destination.error(errorObject_1.errorObject.e);
}

@@ -44,0 +51,0 @@ else {

import { Operator } from '../Operator';
import { Observable } from '../Observable';
import { Scheduler } from '../Scheduler';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
import { OuterSubscriber } from '../OuterSubscriber';
import { InnerSubscriber } from '../InnerSubscriber';
import { Observable } from '../Observable';
export declare class ExpandOperator<T, R> implements Operator<T, R> {

@@ -24,7 +24,7 @@ private project;

private static dispatch({subscriber, result, value, index});
_next(value: any): void;
protected _next(value: any): void;
private subscribeToProjection(result, value, index);
_complete(): void;
notifyComplete(innerSub?: InnerSubscriber<T, R>): void;
protected _complete(): void;
notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number): void;
notifyComplete(innerSub: Subscription): void;
}

@@ -51,3 +51,3 @@ var __extends = (this && this.__extends) || function (d, b) {

if (result === errorObject_1.errorObject) {
destination.error(result.e);
destination.error(errorObject_1.errorObject.e);
}

@@ -81,2 +81,5 @@ else if (!this.scheduler) {

};
ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
this._next(innerValue);
};
ExpandSubscriber.prototype.notifyComplete = function (innerSub) {

@@ -93,5 +96,2 @@ var buffer = this.buffer;

};
ExpandSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
this._next(innerValue);
};
return ExpandSubscriber;

@@ -98,0 +98,0 @@ })(OuterSubscriber_1.OuterSubscriber);

import { Observable } from '../Observable';
import { Scheduler } from '../Scheduler';
/**
* Returns an Observable where for each item in the source Observable, the supplied function is applied to each item,
* resulting in a new value to then be applied again with the function.
* @param {function} project the function for projecting the next emitted item of the Observable.
* @param {number} [concurrent] the max number of observables that can be created concurrently. defaults to infinity.
* @param {Scheduler} [scheduler] The Scheduler to use for managing the expansions.
* @returns {Observable} an Observable containing the expansions of the source Observable.
*/
export declare function expand<T, R>(project: (value: T, index: number) => Observable<R>, concurrent?: number, scheduler?: Scheduler): Observable<R>;
var expand_support_1 = require('./expand-support');
/**
* Returns an Observable where for each item in the source Observable, the supplied function is applied to each item,
* resulting in a new value to then be applied again with the function.
* @param {function} project the function for projecting the next emitted item of the Observable.
* @param {number} [concurrent] the max number of observables that can be created concurrently. defaults to infinity.
* @param {Scheduler} [scheduler] The Scheduler to use for managing the expansions.
* @returns {Observable} an Observable containing the expansions of the source Observable.
*/
function expand(project, concurrent, scheduler) {

@@ -3,0 +11,0 @@ if (concurrent === void 0) { concurrent = Number.POSITIVE_INFINITY; }

@@ -0,1 +1,2 @@

import { Observable } from '../Observable';
/**

@@ -10,2 +11,2 @@ * Similar to the well-known `Array.prototype.filter` method, this operator filters values down to a set

*/
export declare function filter<T>(select: (x: T, ix?: number) => boolean, thisArg?: any): any;
export declare function filter<T>(select: (value: T, index: number) => boolean, thisArg?: any): Observable<T>;

@@ -36,2 +36,3 @@ var __extends = (this && this.__extends) || function (d, b) {

_super.call(this, destination);
this.select = select;
this.thisArg = thisArg;

@@ -38,0 +39,0 @@ this.count = 0;

@@ -1,1 +0,8 @@

export declare function _finally<T>(finallySelector: () => void): any;
import { Observable } from '../Observable';
/**
* Returns an Observable that mirrors the source Observable, but will call a specified function when
* the source terminates on complete or error.
* @param {function} finallySelector function to be called when source terminates.
* @returns {Observable} an Observable that mirrors the source, but will call the specified function on termination.
*/
export declare function _finally<T>(finallySelector: () => void): Observable<T>;

@@ -8,2 +8,8 @@ var __extends = (this && this.__extends) || function (d, b) {

var Subscription_1 = require('../Subscription');
/**
* Returns an Observable that mirrors the source Observable, but will call a specified function when
* the source terminates on complete or error.
* @param {function} finallySelector function to be called when source terminates.
* @returns {Observable} an Observable that mirrors the source, but will call the specified function on termination.
*/
function _finally(finallySelector) {

@@ -10,0 +16,0 @@ return this.lift(new FinallyOperator(finallySelector));

import { Operator } from '../Operator';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
export declare class FindValueOperator<T, R> implements Operator<T, R> {
export declare class FindValueOperator<T> implements Operator<T, T> {
private predicate;

@@ -20,4 +20,4 @@ private source;

private notifyComplete(value);
_next(value: T): void;
_complete(): void;
protected _next(value: T): void;
protected _complete(): void;
}
import { Observable } from '../Observable';
/**
* Returns an Observable that searches for the first item in the source Observable that
* matches the specified condition, and returns the first occurence in the source.
* @param {function} predicate function called with each item to test for condition matching.
* @returns {Observable} an Observable of the first item that matches the condition.
*/
export declare function find<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any): Observable<T>;
var find_support_1 = require('./find-support');
/**
* Returns an Observable that searches for the first item in the source Observable that
* matches the specified condition, and returns the first occurence in the source.
* @param {function} predicate function called with each item to test for condition matching.
* @returns {Observable} an Observable of the first item that matches the condition.
*/
function find(predicate, thisArg) {

@@ -3,0 +9,0 @@ if (typeof predicate !== 'function') {

import { Observable } from '../Observable';
/**
* Returns an Observable that searches for the first item in the source Observable that
* matches the specified condition, and returns the the index of the item in the source.
* @param {function} predicate function called with each item to test for condition matching.
* @returns {Observable} an Observable of the index of the first item that matches the condition.
*/
export declare function findIndex<T>(predicate: (value: T, index: number, source: Observable<T>) => boolean, thisArg?: any): Observable<number>;
var find_support_1 = require('./find-support');
/**
* Returns an Observable that searches for the first item in the source Observable that
* matches the specified condition, and returns the the index of the item in the source.
* @param {function} predicate function called with each item to test for condition matching.
* @returns {Observable} an Observable of the index of the first item that matches the condition.
*/
function findIndex(predicate, thisArg) {

@@ -3,0 +9,0 @@ return this.lift(new find_support_1.FindValueOperator(predicate, this, true, thisArg));

import { Observable } from '../Observable';
export declare function first<T, R>(predicate?: (value: T, index: number, source: Observable<T>) => boolean, resultSelector?: (value: T, index: number) => R, defaultValue?: any): Observable<T> | Observable<R>;
/**
* Returns an Observable that emits the first item of the source Observable that matches the specified condition.
* Throws an error if matching element is not found.
* @param {function} predicate function called with each item to test for condition matching.
* @returns {Observable} an Observable of the first item that matches the condition.
*/
export declare function first<T, R>(predicate?: (value: T, index: number, source: Observable<T>) => boolean, resultSelector?: (value: T, index: number) => R, defaultValue?: R): Observable<T> | Observable<R>;

@@ -10,2 +10,8 @@ var __extends = (this && this.__extends) || function (d, b) {

var EmptyError_1 = require('../util/EmptyError');
/**
* Returns an Observable that emits the first item of the source Observable that matches the specified condition.
* Throws an error if matching element is not found.
* @param {function} predicate function called with each item to test for condition matching.
* @returns {Observable} an Observable of the first item that matches the condition.
*/
function first(predicate, resultSelector, defaultValue) {

@@ -12,0 +18,0 @@ return this.lift(new FirstOperator(predicate, resultSelector, defaultValue, this));

@@ -5,21 +5,21 @@ import { Subscription } from '../Subscription';

import { Observable } from '../Observable';
export declare class RefCountSubscription<T> extends Subscription<T> {
primary: Subscription<T>;
export declare class RefCountSubscription extends Subscription {
primary: Subscription;
attemptedToUnsubscribePrimary: boolean;
count: number;
constructor();
setPrimary(subscription: Subscription<T>): void;
setPrimary(subscription: Subscription): void;
unsubscribe(): void;
}
export declare class GroupedObservable<T> extends Observable<T> {
key: string;
export declare class GroupedObservable<K, T> extends Observable<T> {
key: K;
private groupSubject;
private refCountSubscription;
constructor(key: string, groupSubject: Subject<T>, refCountSubscription?: RefCountSubscription<T>);
_subscribe(subscriber: Subscriber<T>): Subscription<{}>;
constructor(key: K, groupSubject: Subject<T>, refCountSubscription?: RefCountSubscription);
_subscribe(subscriber: Subscriber<T>): Subscription;
}
export declare class InnerRefCountSubscription<T> extends Subscription<T> {
export declare class InnerRefCountSubscription extends Subscription {
private parent;
constructor(parent: RefCountSubscription<T>);
constructor(parent: RefCountSubscription);
unsubscribe(): void;
}

@@ -5,4 +5,4 @@ import { Subscriber } from '../Subscriber';

import { GroupedObservable } from './groupBy-support';
export declare function groupBy<T, R>(keySelector: (value: T) => string, elementSelector?: (value: T) => R, durationSelector?: (grouped: GroupedObservable<R>) => Observable<any>): GroupByObservable<T, R>;
export declare class GroupByObservable<T, R> extends Observable<GroupedObservable<R>> {
export declare function groupBy<T, K, R>(keySelector: (value: T) => K, elementSelector?: (value: T) => R, durationSelector?: (grouped: GroupedObservable<K, R>) => Observable<any>): GroupByObservable<T, K, R>;
export declare class GroupByObservable<T, K, R> extends Observable<GroupedObservable<K, R>> {
source: Observable<T>;

@@ -12,4 +12,4 @@ private keySelector;

private durationSelector;
constructor(source: Observable<T>, keySelector: (value: T) => string, elementSelector?: (value: T) => R, durationSelector?: (grouped: GroupedObservable<R>) => Observable<any>);
_subscribe(subscriber: Subscriber<any>): Subscription<T> | Function | void;
constructor(source: Observable<T>, keySelector: (value: T) => K, elementSelector?: (value: T) => R, durationSelector?: (grouped: GroupedObservable<K, R>) => Observable<any>);
_subscribe(subscriber: Subscriber<any>): Subscription;
}

@@ -51,3 +51,3 @@ var __extends = (this && this.__extends) || function (d, b) {

if (key === errorObject_1.errorObject) {
this.error(key.e);
this.error(errorObject_1.errorObject.e);
}

@@ -68,6 +68,6 @@ else {

if (duration === errorObject_1.errorObject) {
this.error(duration.e);
this.error(errorObject_1.errorObject.e);
}
else {
this.add(duration._subscribe(new GroupDurationSubscriber(key, group, this)));
this.add(duration.subscribe(new GroupDurationSubscriber(key, group, this)));
}

@@ -80,3 +80,3 @@ }

if (value === errorObject_1.errorObject) {
this.error(value.e);
this.error(errorObject_1.errorObject.e);
}

@@ -109,3 +109,3 @@ else {

group.complete();
_this.removeGroup(group);
_this.removeGroup(key);
});

@@ -123,3 +123,3 @@ }

function GroupDurationSubscriber(key, group, parent) {
_super.call(this, null);
_super.call(this);
this.key = key;

@@ -126,0 +126,0 @@ this.group = group;

@@ -1,1 +0,2 @@

export declare function ignoreElements(): any;
import { Observable } from '../Observable';
export declare function ignoreElements<T>(): Observable<T>;

@@ -1,1 +0,2 @@

export declare function isEmpty(): any;
import { Observable } from '../Observable';
export declare function isEmpty(): Observable<boolean>;
import { Observable } from '../Observable';
export declare function last<T, R>(predicate?: (value: T, index: number, source: Observable<T>) => boolean, resultSelector?: (value: T, index: number) => R, defaultValue?: any): Observable<T> | Observable<R>;
export declare function last<T, R>(predicate?: (value: T, index: number, source: Observable<T>) => boolean, resultSelector?: (value: T, index: number) => R, defaultValue?: R): Observable<T> | Observable<R>;

@@ -10,2 +10,2 @@ import { Observable } from '../Observable';

*/
export declare function map<T, R>(project: (x: T, ix?: number) => R, thisArg?: any): Observable<R>;
export declare function map<T, R>(project: (value: T, index: number) => R, thisArg?: any): Observable<R>;

@@ -0,1 +1,2 @@

import { Observable } from '../Observable';
/**

@@ -6,2 +7,2 @@ * Maps every value to the same value every time.

*/
export declare function mapTo<T, R>(value: R): any;
export declare function mapTo<T, R>(value: R): Observable<R>;
import { Observable } from '../Observable';
export declare function max<T, R>(comparer?: (x: R, y: T) => R): Observable<R>;
export declare function max<T>(comparer?: (value1: T, value2: T) => T): Observable<T>;
import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
export declare function merge<R>(...observables: Array<Observable<any> | Scheduler | number>): Observable<R>;
export declare function merge<T, R>(...observables: Array<Observable<any> | Scheduler | number>): Observable<R>;
var fromArray_1 = require('../observable/fromArray');
var mergeAll_support_1 = require('./mergeAll-support');
var queue_1 = require('../scheduler/queue');
var isScheduler_1 = require('../util/isScheduler');

@@ -11,3 +10,3 @@ function merge() {

var concurrent = Number.POSITIVE_INFINITY;
var scheduler = queue_1.queue;
var scheduler = null;
var last = observables[observables.length - 1];

@@ -14,0 +13,0 @@ if (isScheduler_1.isScheduler(last)) {

import { Observable } from '../Observable';
import { Scheduler } from '../Scheduler';
export declare function merge<R>(...observables: (Observable<any> | Scheduler | number)[]): Observable<R>;
export declare function merge<T, R>(...observables: Array<Observable<any> | Scheduler | number>): Observable<R>;

@@ -0,1 +1,2 @@

import { Observable } from '../Observable';
import { Operator } from '../Operator';

@@ -5,8 +6,8 @@ import { Observer } from '../Observer';

import { OuterSubscriber } from '../OuterSubscriber';
export declare class MergeAllOperator<T, R> implements Operator<T, R> {
export declare class MergeAllOperator<T> implements Operator<Observable<T>, T> {
private concurrent;
constructor(concurrent: number);
call(observer: Observer<T>): MergeAllSubscriber<T, {}>;
call(observer: Observer<T>): MergeAllSubscriber<T>;
}
export declare class MergeAllSubscriber<T, R> extends OuterSubscriber<T, R> {
export declare class MergeAllSubscriber<T> extends OuterSubscriber<Observable<T>, T> {
private concurrent;

@@ -17,5 +18,5 @@ private hasCompleted;

constructor(destination: Observer<T>, concurrent: number);
_next(observable: any): void;
_complete(): void;
notifyComplete(innerSub: Subscription<T>): void;
protected _next(observable: Observable<T>): void;
protected _complete(): void;
notifyComplete(innerSub: Subscription): void;
}

@@ -1,2 +0,1 @@

import { Observable } from '../Observable';
export declare function mergeAll<R>(concurrent?: number): Observable<R>;
export declare function mergeAll<T>(concurrent?: number): T;

@@ -22,7 +22,7 @@ import { Observable } from '../Observable';

constructor(destination: Subscriber<R>, project: (value: T, index: number) => Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2, concurrent?: number);
_next(value: any): void;
_innerSub(ish: any, value: T, index: number): void;
_complete(): void;
protected _next(value: any): void;
private _innerSub(ish, value, index);
protected _complete(): void;
notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number): void;
notifyComplete(innerSub: Subscription<T>): void;
notifyComplete(innerSub: Subscription): void;
}

@@ -42,3 +42,3 @@ var __extends = (this && this.__extends) || function (d, b) {

if (ish === errorObject_1.errorObject) {
destination.error(ish.e);
destination.error(errorObject_1.errorObject.e);
}

@@ -45,0 +45,0 @@ else {

import { Observable } from '../Observable';
export declare function mergeMap<T, R, R2>(project: (value: T, index: number) => Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R, concurrent?: number): any;
export declare function mergeMap<T, R, R2>(project: (value: T, index: number) => Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2 | number, concurrent?: number): Observable<R2>;
import { Operator } from '../Operator';
import { Observer } from '../Observer';
import { Observable } from '../Observable';
import { Subscriber } from '../Subscriber';
import { Subscription } from '../Subscription';
import { OuterSubscriber } from '../OuterSubscriber';
import { InnerSubscriber } from '../InnerSubscriber';
export declare class MergeMapToOperator<T, R, R2> implements Operator<T, R> {
export declare class MergeMapToOperator<T, R, R2> implements Operator<Observable<T>, R2> {
private ish;
private resultSelector;
private concurrent;
constructor(ish: any, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2, concurrent?: number);
call(observer: Subscriber<R>): Subscriber<T>;
constructor(ish: Observable<R> | Promise<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2, concurrent?: number);
call(observer: Subscriber<R2>): Subscriber<T>;
}

@@ -21,9 +21,9 @@ export declare class MergeMapToSubscriber<T, R, R2> extends OuterSubscriber<T, R> {

protected index: number;
constructor(destination: Subscriber<R>, ish: any, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2, concurrent?: number);
_next(value: any): void;
_innerSub(ish: any, destination: Observer<R>, resultSelector: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2, value: T, index: number): void;
_complete(): void;
constructor(destination: Subscriber<R2>, ish: Observable<R> | Promise<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2, concurrent?: number);
protected _next(value: any): void;
private _innerSub(ish, destination, resultSelector, value, index);
protected _complete(): void;
notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number): void;
notifyError(err: any): void;
notifyComplete(innerSub: InnerSubscriber<T, R>): void;
notifyComplete(innerSub: Subscription): void;
}
import { Observable } from '../Observable';
export declare function mergeMapTo<T, R, R2>(observable: Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2, concurrent?: number): Observable<R2>;
export declare function mergeMapTo<T, R, R2>(observable: Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2 | number, concurrent?: number): Observable<R2>;

@@ -6,3 +6,3 @@ import { Operator } from '../Operator';

import { OuterSubscriber } from '../OuterSubscriber';
export declare function mergeScan<T, R>(project: (acc: R, x: T) => Observable<R>, seed: R, concurrent?: number): any;
export declare function mergeScan<T, R>(project: (acc: R, value: T) => Observable<R>, seed: R, concurrent?: number): Observable<R>;
export declare class MergeScanOperator<T, R> implements Operator<T, R> {

@@ -12,3 +12,3 @@ private project;

private concurrent;
constructor(project: (acc: R, x: T) => Observable<R>, seed: R, concurrent: number);
constructor(project: (acc: R, value: T) => Observable<R>, seed: R, concurrent: number);
call(subscriber: Subscriber<R>): Subscriber<T>;

@@ -25,8 +25,8 @@ }

protected index: number;
constructor(destination: Subscriber<R>, project: (acc: R, x: T) => Observable<R>, acc: R, concurrent: number);
_next(value: any): void;
_innerSub(ish: any, value: T, index: number): void;
_complete(): void;
constructor(destination: Subscriber<R>, project: (acc: R, value: T) => Observable<R>, acc: R, concurrent: number);
protected _next(value: any): void;
private _innerSub(ish, value, index);
protected _complete(): void;
notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number): void;
notifyComplete(innerSub: Subscription<T>): void;
notifyComplete(innerSub: Subscription): void;
}

@@ -46,3 +46,3 @@ var __extends = (this && this.__extends) || function (d, b) {

if (ish === errorObject_1.errorObject) {
destination.error(ish.e);
destination.error(errorObject_1.errorObject.e);
}

@@ -49,0 +49,0 @@ else {

import { Observable } from '../Observable';
export declare function min<T, R>(comparer?: (x: R, y: T) => R): Observable<R>;
export declare function min<T>(comparer?: (value1: T, value2: T) => T): Observable<T>;
import { Scheduler } from '../Scheduler';
import { Operator } from '../Operator';
import { Subscriber } from '../Subscriber';
export declare class ObserveOnOperator<T, R> implements Operator<T, R> {
export declare class ObserveOnOperator<T> implements Operator<T, T> {
private scheduler;

@@ -19,5 +19,5 @@ private delay;

private scheduleMessage(notification);
_next(value: T): void;
_error(err: any): void;
_complete(): void;
protected _next(value: T): void;
protected _error(err: any): void;
protected _complete(): void;
}
import { Observable } from '../Observable';
export declare function partition<T>(predicate: (x: any, i?: any, a?: any) => boolean, thisArg?: any): Observable<T>[];
export declare function partition<T>(predicate: (value: T) => boolean, thisArg?: any): [Observable<T>, Observable<T>];

@@ -1,1 +0,2 @@

export declare function publish(): any;
import { ConnectableObservable } from '../observable/ConnectableObservable';
export declare function publish<T>(): ConnectableObservable<T>;

@@ -1,1 +0,2 @@

export declare function publishBehavior(value: any): any;
import { ConnectableObservable } from '../observable/ConnectableObservable';
export declare function publishBehavior<T>(value: T): ConnectableObservable<T>;
import { Scheduler } from '../Scheduler';
export declare function publishReplay(bufferSize?: number, windowTime?: number, scheduler?: Scheduler): any;
import { ConnectableObservable } from '../observable/ConnectableObservable';
export declare function publishReplay<T>(bufferSize?: number, windowTime?: number, scheduler?: Scheduler): ConnectableObservable<T>;

@@ -6,13 +6,13 @@ import { Operator } from '../Operator';

private seed;
constructor(project: (acc: R, x: T) => R, seed?: R);
constructor(project: (acc: R, value: T) => R, seed?: R);
call(subscriber: Subscriber<T>): Subscriber<T>;
}
export declare class ReduceSubscriber<T, R> extends Subscriber<T> {
acc: R;
acc: T | R;
hasSeed: boolean;
hasValue: boolean;
project: (acc: R, x: T) => R;
constructor(destination: Subscriber<T>, project: (acc: R, x: T) => R, seed?: R);
_next(x: any): void;
_complete(): void;
project: (acc: R, value: T) => R;
constructor(destination: Subscriber<T>, project: (acc: R, value: T) => R, seed?: R);
protected _next(x: T): void;
protected _complete(): void;
}
import { Observable } from '../Observable';
export declare function reduce<T, R>(project: (acc: R, x: T) => R, seed?: R): Observable<R>;
export declare function reduce<T, R>(project: (acc: R, value: T) => R, seed?: R): Observable<R>;

@@ -13,4 +13,7 @@ var __extends = (this && this.__extends) || function (d, b) {

}
else if (count < 0) {
return this.lift(new RepeatOperator(-1, this));
}
else {
return this.lift(new RepeatOperator(count, this));
return this.lift(new RepeatOperator(count - 1, this));
}

@@ -25,70 +28,30 @@ }

RepeatOperator.prototype.call = function (subscriber) {
return new FirstRepeatSubscriber(subscriber, this.count, this.source);
return new RepeatSubscriber(subscriber, this.count, this.source);
};
return RepeatOperator;
})();
var FirstRepeatSubscriber = (function (_super) {
__extends(FirstRepeatSubscriber, _super);
function FirstRepeatSubscriber(destination, count, source) {
_super.call(this);
this.destination = destination;
var RepeatSubscriber = (function (_super) {
__extends(RepeatSubscriber, _super);
function RepeatSubscriber(destination, count, source) {
_super.call(this, destination);
this.count = count;
this.source = source;
destination.add(this);
this.lastSubscription = this;
}
FirstRepeatSubscriber.prototype._next = function (value) {
this.destination.next(value);
};
FirstRepeatSubscriber.prototype._error = function (err) {
this.destination.error(err);
};
FirstRepeatSubscriber.prototype.complete = function () {
if (!this.isUnsubscribed) {
this.resubscribe(this.count);
RepeatSubscriber.prototype.complete = function () {
if (!this.isStopped) {
var _a = this, source = _a.source, count = _a.count;
if (count === 0) {
return _super.prototype.complete.call(this);
}
else if (count > -1) {
this.count = count - 1;
}
this.unsubscribe();
this.isStopped = false;
this.isUnsubscribed = false;
source.subscribe(this);
}
};
FirstRepeatSubscriber.prototype.unsubscribe = function () {
var lastSubscription = this.lastSubscription;
if (lastSubscription === this) {
_super.prototype.unsubscribe.call(this);
}
else {
lastSubscription.unsubscribe();
}
};
FirstRepeatSubscriber.prototype.resubscribe = function (count) {
var _a = this, destination = _a.destination, lastSubscription = _a.lastSubscription;
destination.remove(lastSubscription);
lastSubscription.unsubscribe();
if (count - 1 === 0) {
destination.complete();
}
else {
var nextSubscriber = new MoreRepeatSubscriber(this, count - 1);
this.lastSubscription = this.source.subscribe(nextSubscriber);
destination.add(this.lastSubscription);
}
};
return FirstRepeatSubscriber;
return RepeatSubscriber;
})(Subscriber_1.Subscriber);
var MoreRepeatSubscriber = (function (_super) {
__extends(MoreRepeatSubscriber, _super);
function MoreRepeatSubscriber(parent, count) {
_super.call(this);
this.parent = parent;
this.count = count;
}
MoreRepeatSubscriber.prototype._next = function (value) {
this.parent.destination.next(value);
};
MoreRepeatSubscriber.prototype._error = function (err) {
this.parent.destination.error(err);
};
MoreRepeatSubscriber.prototype._complete = function () {
var count = this.count;
this.parent.resubscribe(count < 0 ? -1 : count);
};
return MoreRepeatSubscriber;
})(Subscriber_1.Subscriber);
//# sourceMappingURL=repeat.js.map

@@ -8,3 +8,3 @@ var __extends = (this && this.__extends) || function (d, b) {

function retry(count) {
if (count === void 0) { count = 0; }
if (count === void 0) { count = -1; }
return this.lift(new RetryOperator(count, this));

@@ -19,68 +19,30 @@ }

RetryOperator.prototype.call = function (subscriber) {
return new FirstRetrySubscriber(subscriber, this.count, this.source);
return new RetrySubscriber(subscriber, this.count, this.source);
};
return RetryOperator;
})();
var FirstRetrySubscriber = (function (_super) {
__extends(FirstRetrySubscriber, _super);
function FirstRetrySubscriber(destination, count, source) {
_super.call(this);
this.destination = destination;
var RetrySubscriber = (function (_super) {
__extends(RetrySubscriber, _super);
function RetrySubscriber(destination, count, source) {
_super.call(this, destination);
this.count = count;
this.source = source;
destination.add(this);
this.lastSubscription = this;
}
FirstRetrySubscriber.prototype._next = function (value) {
this.destination.next(value);
};
FirstRetrySubscriber.prototype.error = function (error) {
if (!this.isUnsubscribed) {
RetrySubscriber.prototype.error = function (err) {
if (!this.isStopped) {
var _a = this, source = _a.source, count = _a.count;
if (count === 0) {
return _super.prototype.error.call(this, err);
}
else if (count > -1) {
this.count = count - 1;
}
this.unsubscribe();
this.resubscribe();
this.isStopped = false;
this.isUnsubscribed = false;
source.subscribe(this);
}
};
FirstRetrySubscriber.prototype._complete = function () {
this.unsubscribe();
this.destination.complete();
};
FirstRetrySubscriber.prototype.resubscribe = function (retried) {
if (retried === void 0) { retried = 0; }
var _a = this, lastSubscription = _a.lastSubscription, destination = _a.destination;
destination.remove(lastSubscription);
lastSubscription.unsubscribe();
var nextSubscriber = new RetryMoreSubscriber(this, this.count, retried + 1);
this.lastSubscription = this.source.subscribe(nextSubscriber);
destination.add(this.lastSubscription);
};
return FirstRetrySubscriber;
return RetrySubscriber;
})(Subscriber_1.Subscriber);
var RetryMoreSubscriber = (function (_super) {
__extends(RetryMoreSubscriber, _super);
function RetryMoreSubscriber(parent, count, retried) {
if (retried === void 0) { retried = 0; }
_super.call(this, null);
this.parent = parent;
this.count = count;
this.retried = retried;
}
RetryMoreSubscriber.prototype._next = function (value) {
this.parent.destination.next(value);
};
RetryMoreSubscriber.prototype._error = function (err) {
var parent = this.parent;
var retried = this.retried;
var count = this.count;
if (count && retried === count) {
parent.destination.error(err);
}
else {
parent.resubscribe(retried);
}
};
RetryMoreSubscriber.prototype._complete = function () {
this.parent.destination.complete();
};
return RetryMoreSubscriber;
})(Subscriber_1.Subscriber);
//# sourceMappingURL=retry.js.map
import { Observable } from '../Observable';
export declare function retryWhen<T>(notifier: (errors: Observable<any>) => Observable<any>): any;
export declare function retryWhen<T>(notifier: (errors: Observable<any>) => Observable<any>): Observable<T>;

@@ -6,6 +6,7 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var Subscriber_1 = require('../Subscriber');
var Subject_1 = require('../Subject');
var tryCatch_1 = require('../util/tryCatch');
var errorObject_1 = require('../util/errorObject');
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
function retryWhen(notifier) {

@@ -21,111 +22,65 @@ return this.lift(new RetryWhenOperator(notifier, this));

RetryWhenOperator.prototype.call = function (subscriber) {
return new FirstRetryWhenSubscriber(subscriber, this.notifier, this.source);
return new RetryWhenSubscriber(subscriber, this.notifier, this.source);
};
return RetryWhenOperator;
})();
var FirstRetryWhenSubscriber = (function (_super) {
__extends(FirstRetryWhenSubscriber, _super);
function FirstRetryWhenSubscriber(destination, notifier, source) {
_super.call(this);
this.destination = destination;
var RetryWhenSubscriber = (function (_super) {
__extends(RetryWhenSubscriber, _super);
function RetryWhenSubscriber(destination, notifier, source) {
_super.call(this, destination);
this.notifier = notifier;
this.source = source;
destination.add(this);
this.lastSubscription = this;
}
FirstRetryWhenSubscriber.prototype._next = function (value) {
this.destination.next(value);
};
FirstRetryWhenSubscriber.prototype.error = function (err) {
var destination = this.destination;
if (!this.isUnsubscribed) {
_super.prototype.unsubscribe.call(this);
if (!this.retryNotifications) {
this.errors = new Subject_1.Subject();
var notifications = tryCatch_1.tryCatch(this.notifier).call(this, this.errors);
if (notifications === errorObject_1.errorObject) {
destination.error(errorObject_1.errorObject.e);
RetryWhenSubscriber.prototype.error = function (err) {
if (!this.isStopped) {
var errors = this.errors;
var retries = this.retries;
var retriesSubscription = this.retriesSubscription;
if (!retries) {
errors = new Subject_1.Subject();
retries = tryCatch_1.tryCatch(this.notifier)(errors);
if (retries === errorObject_1.errorObject) {
return _super.prototype.error.call(this, errorObject_1.errorObject.e);
}
else {
this.retryNotifications = notifications;
var notificationSubscriber = new RetryNotificationSubscriber(this);
this.notificationSubscription = notifications.subscribe(notificationSubscriber);
destination.add(this.notificationSubscription);
}
retriesSubscription = subscribeToResult_1.subscribeToResult(this, retries);
}
this.errors.next(err);
else {
this.errors = null;
this.retriesSubscription = null;
}
this.unsubscribe();
this.isUnsubscribed = false;
this.errors = errors;
this.retries = retries;
this.retriesSubscription = retriesSubscription;
errors.next(err);
}
};
FirstRetryWhenSubscriber.prototype.destinationError = function (err) {
this.tearDown();
this.destination.error(err);
};
FirstRetryWhenSubscriber.prototype._complete = function () {
this.destinationComplete();
};
FirstRetryWhenSubscriber.prototype.destinationComplete = function () {
this.tearDown();
this.destination.complete();
};
FirstRetryWhenSubscriber.prototype.unsubscribe = function () {
var lastSubscription = this.lastSubscription;
if (lastSubscription === this) {
_super.prototype.unsubscribe.call(this);
RetryWhenSubscriber.prototype._unsubscribe = function () {
var _a = this, errors = _a.errors, retriesSubscription = _a.retriesSubscription;
if (errors) {
errors.unsubscribe();
this.errors = null;
}
else {
this.tearDown();
if (retriesSubscription) {
retriesSubscription.unsubscribe();
this.retriesSubscription = null;
}
this.retries = null;
};
FirstRetryWhenSubscriber.prototype.tearDown = function () {
_super.prototype.unsubscribe.call(this);
this.lastSubscription.unsubscribe();
var notificationSubscription = this.notificationSubscription;
if (notificationSubscription) {
notificationSubscription.unsubscribe();
}
RetryWhenSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
var _a = this, errors = _a.errors, retries = _a.retries, retriesSubscription = _a.retriesSubscription;
this.errors = null;
this.retries = null;
this.retriesSubscription = null;
this.unsubscribe();
this.isStopped = false;
this.isUnsubscribed = false;
this.errors = errors;
this.retries = retries;
this.retriesSubscription = retriesSubscription;
this.source.subscribe(this);
};
FirstRetryWhenSubscriber.prototype.resubscribe = function () {
var _a = this, destination = _a.destination, lastSubscription = _a.lastSubscription;
destination.remove(lastSubscription);
lastSubscription.unsubscribe();
var nextSubscriber = new MoreRetryWhenSubscriber(this);
this.lastSubscription = this.source.subscribe(nextSubscriber);
destination.add(this.lastSubscription);
};
return FirstRetryWhenSubscriber;
})(Subscriber_1.Subscriber);
var MoreRetryWhenSubscriber = (function (_super) {
__extends(MoreRetryWhenSubscriber, _super);
function MoreRetryWhenSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
}
MoreRetryWhenSubscriber.prototype._next = function (value) {
this.parent.destination.next(value);
};
MoreRetryWhenSubscriber.prototype._error = function (err) {
this.parent.errors.next(err);
};
MoreRetryWhenSubscriber.prototype._complete = function () {
this.parent.destinationComplete();
};
return MoreRetryWhenSubscriber;
})(Subscriber_1.Subscriber);
var RetryNotificationSubscriber = (function (_super) {
__extends(RetryNotificationSubscriber, _super);
function RetryNotificationSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
}
RetryNotificationSubscriber.prototype._next = function (value) {
this.parent.resubscribe();
};
RetryNotificationSubscriber.prototype._error = function (err) {
this.parent.destinationError(err);
};
RetryNotificationSubscriber.prototype._complete = function () {
this.parent.destinationComplete();
};
return RetryNotificationSubscriber;
})(Subscriber_1.Subscriber);
return RetryWhenSubscriber;
})(OuterSubscriber_1.OuterSubscriber);
//# sourceMappingURL=retryWhen.js.map

@@ -6,3 +6,4 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var Subscriber_1 = require('../Subscriber');
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
function sample(notifier) {

@@ -25,35 +26,23 @@ return this.lift(new SampleOperator(notifier));

_super.call(this, destination);
this.notifier = notifier;
this.hasValue = false;
this.add(notifier._subscribe(new SampleNotificationSubscriber(this)));
this.add(subscribeToResult_1.subscribeToResult(this, notifier));
}
SampleSubscriber.prototype._next = function (value) {
this.lastValue = value;
this.value = value;
this.hasValue = true;
};
SampleSubscriber.prototype.notifyNext = function () {
SampleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
this.emitValue();
};
SampleSubscriber.prototype.notifyComplete = function () {
this.emitValue();
};
SampleSubscriber.prototype.emitValue = function () {
if (this.hasValue) {
this.hasValue = false;
this.destination.next(this.lastValue);
this.destination.next(this.value);
}
};
return SampleSubscriber;
})(Subscriber_1.Subscriber);
var SampleNotificationSubscriber = (function (_super) {
__extends(SampleNotificationSubscriber, _super);
function SampleNotificationSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
}
SampleNotificationSubscriber.prototype._next = function () {
this.parent.notifyNext();
};
SampleNotificationSubscriber.prototype._error = function (err) {
this.parent.error(err);
};
SampleNotificationSubscriber.prototype._complete = function () {
this.parent.notifyNext();
};
return SampleNotificationSubscriber;
})(Subscriber_1.Subscriber);
})(OuterSubscriber_1.OuterSubscriber);
//# sourceMappingURL=sample.js.map
import { Observable } from '../Observable';
/**
* Returns an Observable that applies a specified accumulator function to each item emitted by the source Observable.
* If a seed value is specified, then that value will be used as the initial value for the accumulator.
* If no seed value is specified, the first item of the source is used as the seed.
* @param {function} accumulator The accumulator function called on each item.
* @param {any} [seed] The initial accumulator value.
* @returns {Obervable} An observable of the accumulated values.
*/
export declare function scan<T, R>(accumulator: (acc: R, x: T) => R, seed?: T | R): Observable<R>;

@@ -9,2 +9,10 @@ var __extends = (this && this.__extends) || function (d, b) {

var errorObject_1 = require('../util/errorObject');
/**
* Returns an Observable that applies a specified accumulator function to each item emitted by the source Observable.
* If a seed value is specified, then that value will be used as the initial value for the accumulator.
* If no seed value is specified, the first item of the source is used as the seed.
* @param {function} accumulator The accumulator function called on each item.
* @param {any} [seed] The initial accumulator value.
* @returns {Obervable} An observable of the accumulated values.
*/
function scan(accumulator, seed) {

@@ -11,0 +19,0 @@ return this.lift(new ScanOperator(accumulator, seed));

@@ -48,3 +48,3 @@ var __extends = (this && this.__extends) || function (d, b) {

if (result === errorObject_1.errorObject) {
this.destination.error(result.e);
this.destination.error(errorObject_1.errorObject.e);
}

@@ -51,0 +51,0 @@ else if (result) {

@@ -1,1 +0,2 @@

export declare function skip(total: any): any;
import { Observable } from '../Observable';
export declare function skip<T>(total: number): Observable<T>;

@@ -6,3 +6,4 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var Subscriber_1 = require('../Subscriber');
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
function skipUntil(notifier) {

@@ -25,55 +26,30 @@ return this.lift(new SkipUntilOperator(notifier));

_super.call(this, destination);
this.notifier = notifier;
this.notificationSubscriber = null;
this.notificationSubscriber = new NotificationSubscriber(this);
this.add(this.notifier.subscribe(this.notificationSubscriber));
this.hasValue = false;
this.isInnerStopped = false;
this.add(subscribeToResult_1.subscribeToResult(this, notifier));
}
SkipUntilSubscriber.prototype._next = function (value) {
if (this.notificationSubscriber.hasValue) {
this.destination.next(value);
if (this.hasValue) {
_super.prototype._next.call(this, value);
}
};
SkipUntilSubscriber.prototype._error = function (err) {
this.destination.error(err);
};
SkipUntilSubscriber.prototype._complete = function () {
if (this.notificationSubscriber.hasCompleted) {
this.destination.complete();
if (this.isInnerStopped) {
_super.prototype._complete.call(this);
}
this.notificationSubscriber.unsubscribe();
};
SkipUntilSubscriber.prototype.unsubscribe = function () {
if (this._isUnsubscribed) {
return;
}
else if (this._subscription) {
this._subscription.unsubscribe();
this._isUnsubscribed = true;
}
else {
_super.prototype.unsubscribe.call(this);
this.unsubscribe();
}
};
return SkipUntilSubscriber;
})(Subscriber_1.Subscriber);
var NotificationSubscriber = (function (_super) {
__extends(NotificationSubscriber, _super);
function NotificationSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
this.hasValue = false;
this.hasCompleted = false;
}
NotificationSubscriber.prototype._next = function (unused) {
SkipUntilSubscriber.prototype.notifyNext = function () {
this.hasValue = true;
};
NotificationSubscriber.prototype._error = function (err) {
this.parent.error(err);
this.hasValue = true;
SkipUntilSubscriber.prototype.notifyComplete = function () {
this.isInnerStopped = true;
if (this.isStopped) {
_super.prototype._complete.call(this);
}
};
NotificationSubscriber.prototype._complete = function () {
this.hasCompleted = true;
};
return NotificationSubscriber;
})(Subscriber_1.Subscriber);
return SkipUntilSubscriber;
})(OuterSubscriber_1.OuterSubscriber);
//# sourceMappingURL=skipUntil.js.map
import { Observable } from '../Observable';
export declare function skipWhile<T>(predicate: (x: T, index: number) => boolean): Observable<T>;
export declare function skipWhile<T>(predicate: (value: T, index: number) => boolean): Observable<T>;

@@ -36,3 +36,3 @@ var __extends = (this && this.__extends) || function (d, b) {

if (result === errorObject_1.errorObject) {
destination.error(result.e);
destination.error(errorObject_1.errorObject.e);
}

@@ -39,0 +39,0 @@ else {

import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
export declare function startWith<T>(...array: (T | Scheduler)[]): Observable<T>;
export declare function startWith<T>(...array: Array<T | Scheduler>): Observable<T>;

@@ -16,3 +16,3 @@ var fromArray_1 = require('../observable/fromArray');

else {
scheduler = void 0;
scheduler = null;
}

@@ -19,0 +19,0 @@ var len = array.length;

@@ -1,2 +0,1 @@

import { Observable } from '../Observable';
export declare function _switch<T>(): Observable<T>;
export declare function _switch<T>(): T;
import { Observable } from '../Observable';
export declare function switchMap<T, R, R2>(project: (value: T, index: number) => Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2): Observable<R>;
export declare function switchMap<T, R, R2>(project: (value: T, index: number) => Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2): Observable<R2>;

@@ -30,3 +30,2 @@ var __extends = (this && this.__extends) || function (d, b) {

this.resultSelector = resultSelector;
this.hasCompleted = false;
this.index = 0;

@@ -39,3 +38,3 @@ }

if (result === errorObject_1.errorObject) {
destination.error(result.e);
destination.error(errorObject_1.errorObject.e);
}

@@ -52,21 +51,16 @@ else {

var innerSubscription = this.innerSubscription;
this.hasCompleted = true;
if (!innerSubscription || innerSubscription.isUnsubscribed) {
this.destination.complete();
_super.prototype._complete.call(this);
}
};
SwitchMapSubscriber.prototype._unsubscribe = function () {
this.innerSubscription = null;
};
SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {
this.remove(innerSub);
var prevSubscription = this.innerSubscription;
if (prevSubscription) {
prevSubscription.unsubscribe();
}
this.innerSubscription = null;
if (this.hasCompleted) {
this.destination.complete();
if (this.isStopped) {
_super.prototype._complete.call(this);
}
};
SwitchMapSubscriber.prototype.notifyError = function (err) {
this.destination.error(err);
};
SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {

@@ -73,0 +67,0 @@ var _a = this, resultSelector = _a.resultSelector, destination = _a.destination;

import { Observable } from '../Observable';
export declare function switchMapTo<T, R, R2>(observable: Observable<R>, projectResult?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2): Observable<R2>;
export declare function switchMapTo<T, R, R2>(observable: Observable<R>, resultSelector?: (outerValue: T, innerValue: R, outerIndex: number, innerIndex: number) => R2): Observable<R2>;

@@ -10,4 +10,4 @@ var __extends = (this && this.__extends) || function (d, b) {

var subscribeToResult_1 = require('../util/subscribeToResult');
function switchMapTo(observable, projectResult) {
return this.lift(new SwitchMapToOperator(observable, projectResult));
function switchMapTo(observable, resultSelector) {
return this.lift(new SwitchMapToOperator(observable, resultSelector));
}

@@ -31,7 +31,5 @@ exports.switchMapTo = switchMapTo;

this.resultSelector = resultSelector;
this.hasCompleted = false;
this.index = 0;
}
SwitchMapToSubscriber.prototype._next = function (value) {
var index = this.index++;
var innerSubscription = this.innerSubscription;

@@ -41,25 +39,20 @@ if (innerSubscription) {

}
this.add(this.innerSubscription = subscribeToResult_1.subscribeToResult(this, this.inner, value, index));
this.add(this.innerSubscription = subscribeToResult_1.subscribeToResult(this, this.inner, value, this.index++));
};
SwitchMapToSubscriber.prototype._complete = function () {
var innerSubscription = this.innerSubscription;
this.hasCompleted = true;
if (!innerSubscription || innerSubscription.isUnsubscribed) {
this.destination.complete();
_super.prototype._complete.call(this);
}
};
SwitchMapToSubscriber.prototype._unsubscribe = function () {
this.innerSubscription = null;
};
SwitchMapToSubscriber.prototype.notifyComplete = function (innerSub) {
this.remove(innerSub);
var prevSubscription = this.innerSubscription;
if (prevSubscription) {
prevSubscription.unsubscribe();
}
this.innerSubscription = null;
if (this.hasCompleted) {
this.destination.complete();
if (this.isStopped) {
_super.prototype._complete.call(this);
}
};
SwitchMapToSubscriber.prototype.notifyError = function (err) {
this.destination.error(err);
};
SwitchMapToSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {

@@ -66,0 +59,0 @@ var _a = this, resultSelector = _a.resultSelector, destination = _a.destination;

@@ -1,1 +0,2 @@

export declare function take(total: any): any;
import { Observable } from '../Observable';
export declare function take<T>(total: number): Observable<T>;
import { Observable } from '../Observable';
export declare function takeUntil<T>(notifier: Observable<any>): any;
export declare function takeUntil<T>(notifier: Observable<any>): Observable<T>;

@@ -6,4 +6,4 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var Subscriber_1 = require('../Subscriber');
var noop_1 = require('../util/noop');
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
function takeUntil(notifier) {

@@ -27,29 +27,12 @@ return this.lift(new TakeUntilOperator(notifier));

this.notifier = notifier;
this.notificationSubscriber = null;
this.notificationSubscriber = new TakeUntilInnerSubscriber(destination);
this.add(notifier.subscribe(this.notificationSubscriber));
this.add(subscribeToResult_1.subscribeToResult(this, notifier));
}
TakeUntilSubscriber.prototype._complete = function () {
this.destination.complete();
this.notificationSubscriber.unsubscribe();
TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
this.complete();
};
TakeUntilSubscriber.prototype.notifyComplete = function () {
// noop
};
return TakeUntilSubscriber;
})(Subscriber_1.Subscriber);
var TakeUntilInnerSubscriber = (function (_super) {
__extends(TakeUntilInnerSubscriber, _super);
function TakeUntilInnerSubscriber(destination) {
_super.call(this, null);
this.destination = destination;
}
TakeUntilInnerSubscriber.prototype._next = function (unused) {
this.destination.complete();
};
TakeUntilInnerSubscriber.prototype._error = function (err) {
this.destination.error(err);
};
TakeUntilInnerSubscriber.prototype._complete = function () {
noop_1.noop();
};
return TakeUntilInnerSubscriber;
})(Subscriber_1.Subscriber);
})(OuterSubscriber_1.OuterSubscriber);
//# sourceMappingURL=takeUntil.js.map

@@ -33,3 +33,3 @@ var __extends = (this && this.__extends) || function (d, b) {

if (result == errorObject_1.errorObject) {
destination.error(result.e);
destination.error(errorObject_1.errorObject.e);
}

@@ -36,0 +36,0 @@ else if (Boolean(result)) {

import { Observable } from '../Observable';
export declare function throttle<T>(durationSelector: (value: T) => Observable<any> | Promise<any>): Observable<T>;
export declare function throttle<T>(durationSelector: (value: T) => Observable<number> | Promise<number>): Observable<T>;

@@ -6,7 +6,6 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var fromPromise_1 = require('../observable/fromPromise');
var Subscriber_1 = require('../Subscriber');
var tryCatch_1 = require('../util/tryCatch');
var isPromise_1 = require('../util/isPromise');
var errorObject_1 = require('../util/errorObject');
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
function throttle(durationSelector) {

@@ -33,50 +32,28 @@ return this.lift(new ThrottleOperator(durationSelector));

if (!this.throttled) {
var destination = this.destination;
var duration = tryCatch_1.tryCatch(this.durationSelector)(value);
if (duration === errorObject_1.errorObject) {
destination.error(errorObject_1.errorObject.e);
return;
this.destination.error(errorObject_1.errorObject.e);
}
if (isPromise_1.isPromise(duration)) {
duration = fromPromise_1.PromiseObservable.create(duration);
else {
this.add(this.throttled = subscribeToResult_1.subscribeToResult(this, duration));
this.destination.next(value);
}
this.add(this.throttled = duration._subscribe(new ThrottleDurationSelectorSubscriber(this)));
destination.next(value);
}
};
ThrottleSubscriber.prototype._error = function (err) {
this.clearThrottle();
_super.prototype._error.call(this, err);
};
ThrottleSubscriber.prototype._complete = function () {
this.clearThrottle();
_super.prototype._complete.call(this);
};
ThrottleSubscriber.prototype.clearThrottle = function () {
ThrottleSubscriber.prototype._unsubscribe = function () {
var throttled = this.throttled;
if (throttled) {
throttled.unsubscribe();
this.remove(throttled);
this.throttled = null;
throttled.unsubscribe();
}
};
return ThrottleSubscriber;
})(Subscriber_1.Subscriber);
var ThrottleDurationSelectorSubscriber = (function (_super) {
__extends(ThrottleDurationSelectorSubscriber, _super);
function ThrottleDurationSelectorSubscriber(parent) {
_super.call(this, null);
this.parent = parent;
}
ThrottleDurationSelectorSubscriber.prototype._next = function (unused) {
this.parent.clearThrottle();
ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
this._unsubscribe();
};
ThrottleDurationSelectorSubscriber.prototype._error = function (err) {
this.parent.error(err);
ThrottleSubscriber.prototype.notifyComplete = function () {
this._unsubscribe();
};
ThrottleDurationSelectorSubscriber.prototype._complete = function () {
this.parent.clearThrottle();
};
return ThrottleDurationSelectorSubscriber;
})(Subscriber_1.Subscriber);
return ThrottleSubscriber;
})(OuterSubscriber_1.OuterSubscriber);
//# sourceMappingURL=throttle.js.map
import { Scheduler } from '../Scheduler';
export declare function throttleTime<T>(delay: number, scheduler?: Scheduler): any;
import { Observable } from '../Observable';
export declare function throttleTime<T>(delay: number, scheduler?: Scheduler): Observable<T>;
import { Observable } from '../Observable';
import { Scheduler } from '../Scheduler';
export declare function timeInterval<T>(scheduler?: Scheduler): Observable<TimeInterval>;
export declare class TimeInterval {
value: any;
export declare function timeInterval<T>(scheduler?: Scheduler): Observable<TimeInterval<T>>;
export declare class TimeInterval<T> {
value: T;
interval: number;
constructor(value: any, interval: number);
constructor(value: T, interval: number);
}

@@ -7,5 +7,5 @@ var __extends = (this && this.__extends) || function (d, b) {

var Subscriber_1 = require('../Subscriber');
var queue_1 = require('../scheduler/queue');
var asap_1 = require('../scheduler/asap');
function timeInterval(scheduler) {
if (scheduler === void 0) { scheduler = queue_1.queue; }
if (scheduler === void 0) { scheduler = asap_1.asap; }
return this.lift(new TimeIntervalOperator(scheduler));

@@ -12,0 +12,0 @@ }

import { Scheduler } from '../Scheduler';
export declare function timeout(due: number | Date, errorToSend?: any, scheduler?: Scheduler): any;
import { Observable } from '../Observable';
export declare function timeout<T>(due: number | Date, errorToSend?: any, scheduler?: Scheduler): Observable<T>;

@@ -6,10 +6,10 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var asap_1 = require('../scheduler/asap');
var isDate_1 = require('../util/isDate');
var Subscriber_1 = require('../Subscriber');
var queue_1 = require('../scheduler/queue');
var isDate_1 = require('../util/isDate');
function timeout(due, errorToSend, scheduler) {
if (errorToSend === void 0) { errorToSend = null; }
if (scheduler === void 0) { scheduler = queue_1.queue; }
if (scheduler === void 0) { scheduler = asap_1.asap; }
var absoluteTimeout = isDate_1.isDate(due);
var waitFor = absoluteTimeout ? (+due - scheduler.now()) : due;
var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
return this.lift(new TimeoutOperator(waitFor, absoluteTimeout, errorToSend, scheduler));

@@ -16,0 +16,0 @@ }

import { Scheduler } from '../Scheduler';
import { Observable } from '../Observable';
export declare function timeoutWith<T, R>(due: number | Date, withObservable: Observable<R>, scheduler?: Scheduler): Observable<T> | Observable<R>;
export declare function timeoutWith<T, R>(due: number | Date, withObservable: Observable<R>, scheduler?: Scheduler): Observable<T | R>;

@@ -6,3 +6,3 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var queue_1 = require('../scheduler/queue');
var asap_1 = require('../scheduler/asap');
var isDate_1 = require('../util/isDate');

@@ -12,5 +12,5 @@ var OuterSubscriber_1 = require('../OuterSubscriber');

function timeoutWith(due, withObservable, scheduler) {
if (scheduler === void 0) { scheduler = queue_1.queue; }
if (scheduler === void 0) { scheduler = asap_1.asap; }
var absoluteTimeout = isDate_1.isDate(due);
var waitFor = absoluteTimeout ? (+due - scheduler.now()) : due;
var waitFor = absoluteTimeout ? (+due - scheduler.now()) : Math.abs(due);
return this.lift(new TimeoutWithOperator(waitFor, absoluteTimeout, withObservable, scheduler));

@@ -34,3 +34,3 @@ }

function TimeoutWithSubscriber(destination, absoluteTimeout, waitFor, withObservable, scheduler) {
_super.call(this, null);
_super.call(this);
this.destination = destination;

@@ -37,0 +37,0 @@ this.absoluteTimeout = absoluteTimeout;

@@ -1,1 +0,2 @@

export declare function toArray(): any;
import { Observable } from '../Observable';
export declare function toArray<T>(): Observable<T[]>;

@@ -27,3 +27,3 @@ var __extends = (this && this.__extends) || function (d, b) {

this.closingNotifier = closingNotifier;
this.add(closingNotifier._subscribe(new WindowClosingNotifierSubscriber(this)));
this.add(closingNotifier.subscribe(new WindowClosingNotifierSubscriber(this)));
this.openWindow();

@@ -52,2 +52,8 @@ }

};
WindowSubscriber.prototype.errorWindow = function (err) {
this._error(err);
};
WindowSubscriber.prototype.completeWindow = function () {
this._complete();
};
return WindowSubscriber;

@@ -58,3 +64,3 @@ })(Subscriber_1.Subscriber);

function WindowClosingNotifierSubscriber(parent) {
_super.call(this, null);
_super.call(this);
this.parent = parent;

@@ -66,6 +72,6 @@ }

WindowClosingNotifierSubscriber.prototype._error = function (err) {
this.parent._error(err);
this.parent.errorWindow(err);
};
WindowClosingNotifierSubscriber.prototype._complete = function () {
this.parent._complete();
this.parent.completeWindow();
};

@@ -72,0 +78,0 @@ return WindowClosingNotifierSubscriber;

@@ -6,3 +6,2 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var Subscriber_1 = require('../Subscriber');
var Subject_1 = require('../Subject');

@@ -12,2 +11,4 @@ var Subscription_1 = require('../Subscription');

var errorObject_1 = require('../util/errorObject');
var OuterSubscriber_1 = require('../OuterSubscriber');
var subscribeToResult_1 = require('../util/subscribeToResult');
function windowToggle(openings, closingSelector) {

@@ -31,13 +32,14 @@ return this.lift(new WindowToggleOperator(openings, closingSelector));

_super.call(this, destination);
this.destination = destination;
this.openings = openings;
this.closingSelector = closingSelector;
this.contexts = [];
this.add(this.openings._subscribe(new WindowToggleOpeningsSubscriber(this)));
this.add(this.openSubscription = subscribeToResult_1.subscribeToResult(this, openings, openings));
}
WindowToggleSubscriber.prototype._next = function (value) {
var contexts = this.contexts;
var len = contexts.length;
for (var i = 0; i < len; i++) {
contexts[i].window.next(value);
if (contexts) {
var len = contexts.length;
for (var i = 0; i < len; i++) {
contexts[i].window.next(value);
}
}

@@ -47,83 +49,81 @@ };

var contexts = this.contexts;
while (contexts.length > 0) {
contexts.shift().window.error(err);
this.contexts = null;
if (contexts) {
var len = contexts.length;
var index = -1;
while (++index < len) {
var context = contexts[index];
context.window.error(err);
context.subscription.unsubscribe();
}
}
this.destination.error(err);
_super.prototype._error.call(this, err);
};
WindowToggleSubscriber.prototype._complete = function () {
var contexts = this.contexts;
while (contexts.length > 0) {
var context = contexts.shift();
context.window.complete();
context.subscription.unsubscribe();
this.contexts = null;
if (contexts) {
var len = contexts.length;
var index = -1;
while (++index < len) {
var context = contexts[index];
context.window.complete();
context.subscription.unsubscribe();
}
}
this.destination.complete();
_super.prototype._complete.call(this);
};
WindowToggleSubscriber.prototype.openWindow = function (value) {
var closingSelector = this.closingSelector;
var closingNotifier = tryCatch_1.tryCatch(closingSelector)(value);
if (closingNotifier === errorObject_1.errorObject) {
this.error(closingNotifier.e);
WindowToggleSubscriber.prototype._unsubscribe = function () {
var contexts = this.contexts;
this.contexts = null;
if (contexts) {
var len = contexts.length;
var index = -1;
while (++index < len) {
var context = contexts[index];
context.window.unsubscribe();
context.subscription.unsubscribe();
}
}
};
WindowToggleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
if (outerValue === this.openings) {
var closingSelector = this.closingSelector;
var closingNotifier = tryCatch_1.tryCatch(closingSelector)(innerValue);
if (closingNotifier === errorObject_1.errorObject) {
return this.error(errorObject_1.errorObject.e);
}
else {
var window_1 = new Subject_1.Subject();
var subscription = new Subscription_1.Subscription();
var context = { window: window_1, subscription: subscription };
this.contexts.push(context);
var innerSubscription = subscribeToResult_1.subscribeToResult(this, closingNotifier, context);
innerSubscription.context = context;
subscription.add(innerSubscription);
this.destination.next(window_1);
}
}
else {
var destination = this.destination;
var window_1 = new Subject_1.Subject();
var subscription = new Subscription_1.Subscription();
var context = { window: window_1, subscription: subscription };
this.contexts.push(context);
var subscriber = new WindowClosingNotifierSubscriber(this, context);
var closingSubscription = closingNotifier._subscribe(subscriber);
subscription.add(closingSubscription);
destination.add(subscription);
destination.add(window_1);
destination.next(window_1);
this.closeWindow(this.contexts.indexOf(outerValue));
}
};
WindowToggleSubscriber.prototype.closeWindow = function (context) {
WindowToggleSubscriber.prototype.notifyError = function (err) {
this.error(err);
};
WindowToggleSubscriber.prototype.notifyComplete = function (inner) {
if (inner !== this.openSubscription) {
this.closeWindow(this.contexts.indexOf(inner.context));
}
};
WindowToggleSubscriber.prototype.closeWindow = function (index) {
var contexts = this.contexts;
var context = contexts[index];
var window = context.window, subscription = context.subscription;
var contexts = this.contexts;
var destination = this.destination;
contexts.splice(contexts.indexOf(context), 1);
contexts.splice(index, 1);
window.complete();
destination.remove(subscription);
destination.remove(window);
subscription.unsubscribe();
};
return WindowToggleSubscriber;
})(Subscriber_1.Subscriber);
var WindowClosingNotifierSubscriber = (function (_super) {
__extends(WindowClosingNotifierSubscriber, _super);
function WindowClosingNotifierSubscriber(parent, windowContext) {
_super.call(this, null);
this.parent = parent;
this.windowContext = windowContext;
}
WindowClosingNotifierSubscriber.prototype._next = function () {
this.parent.closeWindow(this.windowContext);
};
WindowClosingNotifierSubscriber.prototype._error = function (err) {
this.parent.error(err);
};
WindowClosingNotifierSubscriber.prototype._complete = function () {
this.parent.closeWindow(this.windowContext);
};
return WindowClosingNotifierSubscriber;
})(Subscriber_1.Subscriber);
var WindowToggleOpeningsSubscriber = (function (_super) {
__extends(WindowToggleOpeningsSubscriber, _super);
function WindowToggleOpeningsSubscriber(parent) {
_super.call(this);
this.parent = parent;
}
WindowToggleOpeningsSubscriber.prototype._next = function (value) {
this.parent.openWindow(value);
};
WindowToggleOpeningsSubscriber.prototype._error = function (err) {
this.parent.error(err);
};
WindowToggleOpeningsSubscriber.prototype._complete = function () {
// noop
};
return WindowToggleOpeningsSubscriber;
})(Subscriber_1.Subscriber);
})(OuterSubscriber_1.OuterSubscriber);
//# sourceMappingURL=windowToggle.js.map

@@ -69,3 +69,3 @@ var __extends = (this && this.__extends) || function (d, b) {

if (closingNotifier === errorObject_1.errorObject) {
var err = closingNotifier.e;
var err = errorObject_1.errorObject.e;
this.destination.error(err);

@@ -76,3 +76,3 @@ this.window.error(err);

var closingNotification = this.closingNotification = new Subscription_1.Subscription();
closingNotification.add(closingNotifier._subscribe(new WindowClosingNotifierSubscriber(this)));
closingNotification.add(closingNotifier.subscribe(new WindowClosingNotifierSubscriber(this)));
this.add(closingNotification);

@@ -87,3 +87,3 @@ this.add(window);

function WindowClosingNotifierSubscriber(parent) {
_super.call(this, null);
_super.call(this);
this.parent = parent;

@@ -90,0 +90,0 @@ }

@@ -20,2 +20,2 @@ import { Observable } from '../Observable';

*/
export declare function withLatestFrom<R>(...args: Array<Observable<any> | ((...values: Array<any>) => R)>): Observable<R>;
export declare function withLatestFrom<T, R>(...args: Array<Observable<any> | ((...values: Array<any>) => R)>): Observable<R>;

@@ -15,6 +15,6 @@ import { Operator } from '../Operator';

constructor(destination: Subscriber<R>, project?: (...values: Array<any>) => R, values?: any);
_next(value: any): void;
_complete(): void;
protected _next(value: any): void;
protected _complete(): void;
notifyInactive(): void;
checkIterators(): void;
}

@@ -6,2 +6,3 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var isArray_1 = require('../util/isArray');
var Subscriber_1 = require('../Subscriber');

@@ -13,3 +14,2 @@ var tryCatch_1 = require('../util/tryCatch');

var SymbolShim_1 = require('../util/SymbolShim');
var isArray = Array.isArray;
var ZipOperator = (function () {

@@ -39,3 +39,3 @@ function ZipOperator(project) {

var index = this.index++;
if (isArray(value)) {
if (isArray_1.isArray(value)) {
iterators.push(new StaticArrayIterator(value));

@@ -57,3 +57,3 @@ }

if (iterator.stillUnsubscribed) {
iterator.subscribe(iterator, i);
this.add(iterator.subscribe(iterator, i));
}

@@ -205,3 +205,3 @@ else {

ZipBufferIterator.prototype.subscribe = function (value, index) {
this.add(subscribeToResult_1.subscribeToResult(this, this.observable, this, index));
return subscribeToResult_1.subscribeToResult(this, this.observable, this, index);
};

@@ -208,0 +208,0 @@ return ZipBufferIterator;

@@ -1,1 +0,2 @@

export declare function zipAll<T, R>(project?: (...values: Array<any>) => R): any;
import { Observable } from '../Observable';
export declare function zipAll<T, R>(project?: (...values: Array<any>) => R): Observable<R>;

@@ -0,7 +1,7 @@

import { Subscriber } from './Subscriber';
import { InnerSubscriber } from './InnerSubscriber';
import { Subscriber } from './Subscriber';
export declare class OuterSubscriber<T, R> extends Subscriber<T> {
notifyComplete(inner?: InnerSubscriber<T, R>): void;
notifyNext(outerValue: T, innerValue: R, outerIndex: number, innerIndex: number): void;
notifyError(error?: any, inner?: InnerSubscriber<T, R>): void;
notifyError(error: any, innerSub: InnerSubscriber<T, R>): void;
notifyComplete(innerSub: InnerSubscriber<T, R>): void;
}

@@ -12,11 +12,11 @@ var __extends = (this && this.__extends) || function (d, b) {

}
OuterSubscriber.prototype.notifyComplete = function (inner) {
this.destination.complete();
};
OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex) {
this.destination.next(innerValue);
};
OuterSubscriber.prototype.notifyError = function (error, inner) {
OuterSubscriber.prototype.notifyError = function (error, innerSub) {
this.destination.error(error);
};
OuterSubscriber.prototype.notifyComplete = function (innerSub) {
this.destination.complete();
};
return OuterSubscriber;

@@ -23,0 +23,0 @@ })(Subscriber_1.Subscriber);

{
"name": "rxjs",
"engines": {
"npm": ">=2.0.0"
},
"bugs": {
"url": "https://github.com/ReactiveX/RxJS/issues"
},
"repository": {
"type": "git",
"url": "git@github.com:ReactiveX/RxJS.git"
},
"main": "Rx.js",
"author": "Ben Lesh <blesh@netflix.com>",
"version": "5.0.0-beta.0",
"homepage": "https://github.com/ReactiveX/RxJS",
"license": "Apache-2.0",
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
},
"ghooks": {
"commit-msg": "node ./node_modules/validate-commit-msg/index.js"
}
},
"keywords": [
"Rx",
"RxJS",
"ReactiveX",
"ReactiveExtensions",
"Streams",
"Observables",
"Observable",
"Stream",
"ES6",
"ES2015"
],
"description": "Reactive Extensions for modern JavaScript",
"devDependencies": {

@@ -43,2 +6,3 @@ "benchmark": "1.0.0",

"browserify": "11.0.0",
"color": "^0.11.1",
"colors": "1.1.2",

@@ -58,2 +22,3 @@ "commitizen": "2.4.4",

"jasmine": "2.4.1",
"jasmine-ajax": "^3.2.0",
"jasmine-core": "2.4.1",

@@ -64,5 +29,7 @@ "karma": "0.13.15",

"karma-jasmine": "0.3.6",
"karma-sauce-launcher": "0.3.0",
"lodash": "3.10.1",
"madge": "^0.5.3",
"markdown-doctest": "^0.3.0",
"minimist": "^1.2.0",
"mkdirp": "^0.5.1",

@@ -79,5 +46,26 @@ "platform": "1.3.0",

"validate-commit-msg": "1.0.0",
"watch": "0.16.0"
"watch": "0.16.0",
"xmlhttprequest": "^1.8.0"
},
"author": "Ben Lesh <blesh@netflix.com>",
"typings": "Rx.d.ts",
"bugs": {
"url": "https://github.com/ReactiveX/RxJS/issues"
},
"keywords": [
"Rx",
"RxJS",
"ReactiveX",
"ReactiveExtensions",
"Streams",
"Observables",
"Observable",
"Stream",
"ES6",
"ES2015"
],
"license": "Apache-2.0",
"version": "5.0.0-beta.1",
"description": "Reactive Extensions for modern JavaScript",
"main": "Rx.js",
"contributors": [

@@ -108,3 +96,20 @@ {

}
]
],
"config": {
"commitizen": {
"path": "node_modules/cz-conventional-changelog"
},
"ghooks": {
"commit-msg": "node ./node_modules/validate-commit-msg/index.js"
}
},
"repository": {
"type": "git",
"url": "git@github.com:ReactiveX/RxJS.git"
},
"name": "rxjs",
"homepage": "https://github.com/ReactiveX/RxJS",
"engines": {
"npm": ">=2.0.0"
}
}

@@ -110,3 +110,3 @@ [![Build Status](https://travis-ci.org/ReactiveX/RxJS.svg?branch=master)](https://travis-ci.org/ReactiveX/RxJS)

https://npmcdn.com/@reactivex/rxjs@version/dist/global/Rx.js
https://npmcdn.com/@reactivex/rxjs@version/dist/global/Rx.umd.js

@@ -113,0 +113,0 @@ #### Node.js Usage:

import { Subject } from './Subject';
import { Observable } from './Observable';
import { Operator } from './Operator';
import { Observer } from './Observer';
import { Subscription } from './Subscription';

@@ -22,2 +24,2 @@ import { Subscriber } from './Subscriber';

};
export { Subject, Scheduler, Observable, Subscriber, Subscription, Symbol, AsyncSubject, ReplaySubject, BehaviorSubject, ConnectableObservable, Notification, EmptyError, ArgumentOutOfRangeError, ObjectUnsubscribedError };
export { Subject, Scheduler, Observable, Observer, Operator, Subscriber, Subscription, Symbol, AsyncSubject, ReplaySubject, BehaviorSubject, ConnectableObservable, Notification, EmptyError, ArgumentOutOfRangeError, ObjectUnsubscribedError };

@@ -15,3 +15,5 @@ /* tslint:disable:no-unused-variable */

require('./add/operator/merge-static');
require('./add/operator/race-static');
require('./add/observable/bindCallback');
require('./add/observable/bindNodeCallback');
require('./add/observable/defer');

@@ -60,2 +62,3 @@ require('./add/observable/empty');

require('./add/operator/last');
require('./add/operator/let');
require('./add/operator/map');

@@ -71,2 +74,3 @@ require('./add/operator/mapTo');

require('./add/operator/partition');
require('./add/operator/pluck');
require('./add/operator/publish');

@@ -76,2 +80,3 @@ require('./add/operator/publishBehavior');

require('./add/operator/publishLast');
require('./add/operator/race');
require('./add/operator/reduce');

@@ -112,2 +117,4 @@ require('./add/operator/repeat');

/* tslint:disable:no-unused-variable */
var Operator_1 = require('./Operator');
exports.Operator = Operator_1.Operator;
var Subscription_1 = require('./Subscription');

@@ -114,0 +121,0 @@ exports.Subscription = Subscription_1.Subscription;

@@ -11,6 +11,5 @@ import { Subject } from './Subject';

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>;
pairwise?: <R>() => Observable<R>;
timeInterval?: <T>(scheduler?: IScheduler) => Observable<T>;

@@ -21,2 +20,3 @@ mergeScan?: <T, R>(project: (acc: R, x: T) => Observable<R>, seed: R, concurrent?: number) => Observable<R>;

}
import { Observer } from './Observer';
import { Subscription } from './Subscription';

@@ -44,2 +44,2 @@ import { Subscriber } from './Subscriber';

};
export { Subject, Scheduler, Observable, Subscriber, Subscription, AsyncSubject, ReplaySubject, BehaviorSubject, ConnectableObservable, Notification, EmptyError, ArgumentOutOfRangeError, ObjectUnsubscribedError, TestScheduler, VirtualTimeScheduler, TimeInterval, Symbol };
export { Subject, Scheduler, Observable, Observer, Subscriber, Subscription, AsyncSubject, ReplaySubject, BehaviorSubject, ConnectableObservable, Notification, EmptyError, ArgumentOutOfRangeError, ObjectUnsubscribedError, TestScheduler, VirtualTimeScheduler, TimeInterval, Symbol };

@@ -12,3 +12,5 @@ /* tslint:disable:no-unused-variable */

require('./add/operator/merge-static');
require('./add/operator/race-static');
require('./add/observable/bindCallback');
require('./add/observable/bindNodeCallback');
require('./add/observable/defer');

@@ -61,4 +63,2 @@ require('./add/observable/empty');

require('./add/operator/ignoreElements');
require('./add/operator/inspect');
require('./add/operator/inspectTime');
require('./add/operator/isEmpty');

@@ -79,3 +79,5 @@ require('./add/operator/every');

require('./add/operator/observeOn');
require('./add/operator/pairwise');
require('./add/operator/partition');
require('./add/operator/pluck');
require('./add/operator/publish');

@@ -85,2 +87,3 @@ require('./add/operator/publishBehavior');

require('./add/operator/publishLast');
require('./add/operator/race');
require('./add/operator/reduce');

@@ -121,3 +124,2 @@ require('./add/operator/repeat');

require('./add/operator/zipAll');
/* tslint:disable:no-unused-variable */
var Subscription_1 = require('./Subscription');

@@ -124,0 +126,0 @@ exports.Subscription = Subscription_1.Subscription;

@@ -5,7 +5,7 @@ import { Subscription } from './Subscription';

now(): number;
schedule<T>(work: (state?: any) => Subscription<T> | void, delay?: number, state?: any): Subscription<T>;
schedule<T>(work: (state?: any) => Subscription | void, delay?: number, state?: any): Subscription;
flush(): void;
active: boolean;
actions: Action[];
scheduled: boolean;
active: boolean;
scheduledId: number;
}
import { Subscription } from '../Subscription';
import { Scheduler } from '../Scheduler';
export interface Action extends Subscription<any> {
work: (state?: any) => void | Subscription<any>;
export interface Action extends Subscription {
work: (state?: any) => void | Subscription;
state?: any;
delay?: number;
schedule(state?: any, delay?: number): any;
schedule(state?: any, delay?: number): void;
execute(): void;
scheduler: Scheduler;
}

@@ -1,7 +0,6 @@

import { QueueAction } from './QueueAction';
import { Action } from './Action';
export declare class AsapAction<T> extends QueueAction<T> {
private id;
schedule(state?: any): Action;
unsubscribe(): void;
import { FutureAction } from './FutureAction';
export declare class AsapAction<T> extends FutureAction<T> {
_schedule(state?: any, delay?: number): Action;
_unsubscribe(): void;
}

@@ -7,3 +7,3 @@ var __extends = (this && this.__extends) || function (d, b) {

var Immediate_1 = require('../util/Immediate');
var QueueAction_1 = require('./QueueAction');
var FutureAction_1 = require('./FutureAction');
var AsapAction = (function (_super) {

@@ -14,16 +14,15 @@ __extends(AsapAction, _super);

}
AsapAction.prototype.schedule = function (state) {
var _this = this;
if (this.isUnsubscribed) {
return this;
AsapAction.prototype._schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (delay > 0) {
return _super.prototype._schedule.call(this, state, delay);
}
this.delay = delay;
this.state = state;
var scheduler = this.scheduler;
scheduler.actions.push(this);
if (!scheduler.scheduled) {
scheduler.scheduled = true;
this.id = Immediate_1.Immediate.setImmediate(function () {
_this.id = null;
_this.scheduler.scheduled = false;
_this.scheduler.flush();
if (!scheduler.scheduledId) {
scheduler.scheduledId = Immediate_1.Immediate.setImmediate(function () {
scheduler.scheduledId = null;
scheduler.flush();
});

@@ -33,18 +32,17 @@ }

};
AsapAction.prototype.unsubscribe = function () {
var id = this.id;
AsapAction.prototype._unsubscribe = function () {
var scheduler = this.scheduler;
_super.prototype.unsubscribe.call(this);
if (scheduler.actions.length === 0) {
var scheduledId = scheduler.scheduledId, actions = scheduler.actions;
_super.prototype._unsubscribe.call(this);
if (actions.length === 0) {
scheduler.active = false;
scheduler.scheduled = false;
if (scheduledId != null) {
scheduler.scheduledId = null;
Immediate_1.Immediate.clearImmediate(scheduledId);
}
}
if (id) {
this.id = null;
Immediate_1.Immediate.clearImmediate(id);
}
};
return AsapAction;
})(QueueAction_1.QueueAction);
})(FutureAction_1.FutureAction);
exports.AsapAction = AsapAction;
//# sourceMappingURL=AsapAction.js.map

@@ -0,6 +1,6 @@

import { Action } from './Action';
import { Subscription } from '../Subscription';
import { QueueScheduler } from './QueueScheduler';
import { Subscription } from '../Subscription';
import { Action } from './Action';
export declare class AsapScheduler extends QueueScheduler {
scheduleNow<T>(work: (x?: any) => Subscription<T>, state?: any): Action;
scheduleNow<T>(work: (x?: any) => Subscription, state?: any): Action;
}

@@ -6,5 +6,4 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var AsapAction_1 = require('./AsapAction');
var QueueScheduler_1 = require('./QueueScheduler');
var AsapAction_1 = require('./AsapAction');
var QueueAction_1 = require('./QueueAction');
var AsapScheduler = (function (_super) {

@@ -16,5 +15,3 @@ __extends(AsapScheduler, _super);

AsapScheduler.prototype.scheduleNow = function (work, state) {
return (this.scheduled ?
new QueueAction_1.QueueAction(this, work) :
new AsapAction_1.AsapAction(this, work)).schedule(state);
return new AsapAction_1.AsapAction(this, work).schedule(state);
};

@@ -21,0 +18,0 @@ return AsapScheduler;

@@ -0,13 +1,15 @@

import { Action } from './Action';
import { Scheduler } from '../Scheduler';
import { Subscription } from '../Subscription';
import { QueueScheduler } from './QueueScheduler';
import { Action } from './Action';
import { QueueAction } from './QueueAction';
export declare class FutureAction<T> extends QueueAction<T> {
scheduler: QueueScheduler;
work: (x?: any) => Subscription<T> | void;
export declare class FutureAction<T> extends Subscription implements Action {
scheduler: Scheduler;
work: (x?: any) => Subscription | void;
id: any;
state: any;
delay: number;
constructor(scheduler: QueueScheduler, work: (x?: any) => Subscription<T> | void);
constructor(scheduler: Scheduler, work: (x?: any) => Subscription | void);
execute(): void;
schedule(state?: any, delay?: number): Action;
unsubscribe(): void;
_schedule(state?: any, delay?: number): Action;
_unsubscribe(): void;
}

@@ -6,12 +6,18 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var QueueAction_1 = require('./QueueAction');
var root_1 = require('../util/root');
var Subscription_1 = require('../Subscription');
var FutureAction = (function (_super) {
__extends(FutureAction, _super);
function FutureAction(scheduler, work) {
_super.call(this, scheduler, work);
_super.call(this);
this.scheduler = scheduler;
this.work = work;
}
FutureAction.prototype.execute = function () {
if (this.isUnsubscribed) {
throw new Error('How did did we execute a canceled Action?');
}
this.work(this.state);
};
FutureAction.prototype.schedule = function (state, delay) {
var _this = this;
if (delay === void 0) { delay = 0; }

@@ -21,2 +27,7 @@ if (this.isUnsubscribed) {

}
return this._schedule(state, delay);
};
FutureAction.prototype._schedule = function (state, delay) {
var _this = this;
if (delay === void 0) { delay = 0; }
this.delay = delay;

@@ -27,23 +38,30 @@ this.state = state;

this.id = undefined;
clearTimeout(id);
root_1.root.clearTimeout(id);
}
var scheduler = this.scheduler;
this.id = setTimeout(function () {
_this.id = void 0;
this.id = root_1.root.setTimeout(function () {
_this.id = null;
var scheduler = _this.scheduler;
scheduler.actions.push(_this);
scheduler.flush();
}, this.delay);
}, delay);
return this;
};
FutureAction.prototype.unsubscribe = function () {
var id = this.id;
FutureAction.prototype._unsubscribe = function () {
var _a = this, id = _a.id, scheduler = _a.scheduler;
var actions = scheduler.actions;
var index = actions.indexOf(this);
if (id != null) {
this.id = void 0;
clearTimeout(id);
this.id = null;
root_1.root.clearTimeout(id);
}
_super.prototype.unsubscribe.call(this);
if (index !== -1) {
actions.splice(index, 1);
}
this.work = null;
this.state = null;
this.scheduler = null;
};
return FutureAction;
})(QueueAction_1.QueueAction);
})(Subscription_1.Subscription);
exports.FutureAction = FutureAction;
//# sourceMappingURL=FutureAction.js.map

@@ -1,12 +0,5 @@

import { Subscription } from '../Subscription';
import { Scheduler } from '../Scheduler';
import { Action } from './Action';
export declare class QueueAction<T> extends Subscription<T> implements Action {
scheduler: Scheduler;
work: (x?: any) => Subscription<T> | void;
state: any;
constructor(scheduler: Scheduler, work: (x?: any) => Subscription<T> | void);
schedule(state?: any): Action;
execute(): void;
unsubscribe(): void;
import { FutureAction } from './FutureAction';
export declare class QueueAction<T> extends FutureAction<T> {
_schedule(state?: any, delay?: number): Action;
}

@@ -6,14 +6,14 @@ var __extends = (this && this.__extends) || function (d, b) {

};
var Subscription_1 = require('../Subscription');
var FutureAction_1 = require('./FutureAction');
var QueueAction = (function (_super) {
__extends(QueueAction, _super);
function QueueAction(scheduler, work) {
_super.call(this);
this.scheduler = scheduler;
this.work = work;
function QueueAction() {
_super.apply(this, arguments);
}
QueueAction.prototype.schedule = function (state) {
if (this.isUnsubscribed) {
return this;
QueueAction.prototype._schedule = function (state, delay) {
if (delay === void 0) { delay = 0; }
if (delay > 0) {
return _super.prototype._schedule.call(this, state, delay);
}
this.delay = delay;
this.state = state;

@@ -25,23 +25,5 @@ var scheduler = this.scheduler;

};
QueueAction.prototype.execute = function () {
if (this.isUnsubscribed) {
throw new Error('How did did we execute a canceled Action?');
}
this.work(this.state);
};
QueueAction.prototype.unsubscribe = function () {
var scheduler = this.scheduler;
var actions = scheduler.actions;
var index = actions.indexOf(this);
this.work = void 0;
this.state = void 0;
this.scheduler = void 0;
if (index !== -1) {
actions.splice(index, 1);
}
_super.prototype.unsubscribe.call(this);
};
return QueueAction;
})(Subscription_1.Subscription);
})(FutureAction_1.FutureAction);
exports.QueueAction = QueueAction;
//# sourceMappingURL=QueueAction.js.map

@@ -6,10 +6,10 @@ import { Scheduler } from '../Scheduler';

export declare class QueueScheduler implements Scheduler {
active: boolean;
actions: QueueAction<any>[];
active: boolean;
scheduled: boolean;
scheduledId: number;
now(): number;
flush(): void;
schedule<T>(work: (x?: any) => Subscription<T> | void, delay?: number, state?: any): Subscription<T>;
scheduleNow<T>(work: (x?: any) => Subscription<T> | void, state?: any): Action;
scheduleLater<T>(work: (x?: any) => Subscription<T> | void, delay: number, state?: any): Action;
schedule<T>(work: (x?: any) => Subscription | void, delay?: number, state?: any): Subscription;
scheduleNow<T>(work: (x?: any) => Subscription | void, state?: any): Action;
scheduleLater<T>(work: (x?: any) => Subscription | void, delay: number, state?: any): Action;
}

@@ -5,5 +5,5 @@ var QueueAction_1 = require('./QueueAction');

function QueueScheduler() {
this.active = false;
this.actions = [];
this.active = false;
this.scheduled = false;
this.scheduledId = null;
}

@@ -14,3 +14,3 @@ QueueScheduler.prototype.now = function () {

QueueScheduler.prototype.flush = function () {
if (this.active || this.scheduled) {
if (this.active || this.scheduledId) {
return;

@@ -17,0 +17,0 @@ }

@@ -7,3 +7,3 @@ import { Scheduler } from '../Scheduler';

active: boolean;
scheduled: boolean;
scheduledId: number;
index: number;

@@ -17,3 +17,3 @@ sorted: boolean;

addAction<T>(action: Action): void;
schedule<T>(work: (x?: any) => Subscription<T> | void, delay?: number, state?: any): Subscription<T>;
schedule<T>(work: (x?: any) => Subscription | void, delay?: number, state?: any): Subscription;
}

@@ -11,3 +11,3 @@ var __extends = (this && this.__extends) || function (d, b) {

this.active = false;
this.scheduled = false;
this.scheduledId = null;
this.index = 0;

@@ -14,0 +14,0 @@ this.sorted = false;

@@ -6,24 +6,28 @@ import { Operator } from './Operator';

import { Subscription } from './Subscription';
export declare class Subject<T> extends Observable<T> implements Observer<T>, Subscription<T> {
_subscriptions: Subscription<T>[];
_unsubscribe: () => void;
static create<T>(source: Observable<T>, destination: Observer<T>): Subject<T>;
protected destination: Observer<T>;
export declare class Subject<T> extends Observable<T> implements Observer<T>, Subscription {
static create: Function;
constructor(source?: Observable<T>, destination?: Observer<T>);
observers: Observer<T>[];
isUnsubscribed: boolean;
dispatching: boolean;
errorSignal: boolean;
errorInstance: any;
completeSignal: boolean;
protected destination: Observer<T>;
protected isStopped: boolean;
protected hasErrored: boolean;
protected errorValue: any;
protected dispatching: boolean;
protected hasCompleted: boolean;
lift<T, R>(operator: Operator<T, R>): Observable<T>;
_subscribe(subscriber: Subscriber<any>): Subscription<T>;
add(subscription?: any): void;
remove(subscription?: any): void;
add(subscription: Subscription | Function | void): void;
remove(subscription: Subscription): void;
unsubscribe(): void;
_subscribe(subscriber: Subscriber<T>): Subscription | Function | void;
_unsubscribe(): void;
next(value: T): void;
error(err?: any): void;
complete(): void;
_next(value: T): void;
_error(err: any): void;
_complete(): void;
protected _next(value: T): void;
protected _finalNext(value: T): void;
protected _error(err: any): void;
protected _finalError(err: any): void;
protected _complete(): void;
protected _finalComplete(): void;
}

@@ -11,62 +11,59 @@ var __extends = (this && this.__extends) || function (d, b) {

var rxSubscriber_1 = require('./symbol/rxSubscriber');
var subscriptionAdd = Subscription_1.Subscription.prototype.add;
var subscriptionRemove = Subscription_1.Subscription.prototype.remove;
var subscriptionUnsubscribe = Subscription_1.Subscription.prototype.unsubscribe;
var subscriberNext = Subscriber_1.Subscriber.prototype.next;
var subscriberError = Subscriber_1.Subscriber.prototype.error;
var subscriberComplete = Subscriber_1.Subscriber.prototype.complete;
var _subscriberNext = Subscriber_1.Subscriber.prototype._next;
var _subscriberError = Subscriber_1.Subscriber.prototype._error;
var _subscriberComplete = Subscriber_1.Subscriber.prototype._complete;
var Subject = (function (_super) {
__extends(Subject, _super);
function Subject() {
_super.apply(this, arguments);
function Subject(source, destination) {
_super.call(this);
this.observers = [];
this.isUnsubscribed = false;
this.isStopped = false;
this.hasErrored = false;
this.dispatching = false;
this.errorSignal = false;
this.completeSignal = false;
this.hasCompleted = false;
this.source = source;
this.destination = destination;
}
Subject.prototype[rxSubscriber_1.rxSubscriber] = function () {
return this;
};
Subject.create = function (source, destination) {
return new BidirectionalSubject(source, destination);
};
Subject.prototype.lift = function (operator) {
var subject = new BidirectionalSubject(this, this.destination || this);
var subject = new Subject(this, this.destination || this);
subject.operator = operator;
return subject;
};
Subject.prototype._subscribe = function (subscriber) {
if (subscriber.isUnsubscribed) {
return;
}
else if (this.errorSignal) {
subscriber.error(this.errorInstance);
return;
}
else if (this.completeSignal) {
subscriber.complete();
return;
}
else if (this.isUnsubscribed) {
throw new Error('Cannot subscribe to a disposed Subject.');
}
this.observers.push(subscriber);
return new SubjectSubscription_1.SubjectSubscription(this, subscriber);
};
Subject.prototype.add = function (subscription) {
subscriptionAdd.call(this, subscription);
Subscription_1.Subscription.prototype.add.call(this, subscription);
};
Subject.prototype.remove = function (subscription) {
subscriptionRemove.call(this, subscription);
Subscription_1.Subscription.prototype.remove.call(this, subscription);
};
Subject.prototype.unsubscribe = function () {
this.observers = void 0;
subscriptionUnsubscribe.call(this);
Subscription_1.Subscription.prototype.unsubscribe.call(this);
};
Subject.prototype._subscribe = function (subscriber) {
if (this.source) {
return this.source.subscribe(subscriber);
}
else {
if (subscriber.isUnsubscribed) {
return;
}
else if (this.hasErrored) {
return subscriber.error(this.errorValue);
}
else if (this.hasCompleted) {
return subscriber.complete();
}
else if (this.isUnsubscribed) {
throw new Error('Cannot subscribe to a disposed Subject.');
}
var subscription = new SubjectSubscription_1.SubjectSubscription(this, subscriber);
this.observers.push(subscriber);
return subscription;
}
};
Subject.prototype._unsubscribe = function () {
this.source = null;
this.isStopped = true;
this.observers = null;
this.destination = null;
};
Subject.prototype.next = function (value) {
if (this.isUnsubscribed) {
if (this.isStopped) {
return;

@@ -77,15 +74,16 @@ }

this.dispatching = false;
if (this.errorSignal) {
this.error(this.errorInstance);
if (this.hasErrored) {
this._error(this.errorValue);
}
else if (this.completeSignal) {
this.complete();
else if (this.hasCompleted) {
this._complete();
}
};
Subject.prototype.error = function (err) {
if (this.isUnsubscribed || this.completeSignal) {
if (this.isStopped) {
return;
}
this.errorSignal = true;
this.errorInstance = err;
this.isStopped = true;
this.hasErrored = true;
this.errorValue = err;
if (this.dispatching) {

@@ -95,9 +93,9 @@ return;

this._error(err);
this.unsubscribe();
};
Subject.prototype.complete = function () {
if (this.isUnsubscribed || this.errorSignal) {
if (this.isStopped) {
return;
}
this.completeSignal = true;
this.isStopped = true;
this.hasCompleted = true;
if (this.dispatching) {

@@ -107,5 +105,12 @@ return;

this._complete();
this.unsubscribe();
};
Subject.prototype._next = function (value) {
if (this.destination) {
this.destination.next(value);
}
else {
this._finalNext(value);
}
};
Subject.prototype._finalNext = function (value) {
var index = -1;

@@ -119,59 +124,58 @@ var observers = this.observers.slice(0);

Subject.prototype._error = function (err) {
if (this.destination) {
this.destination.error(err);
}
else {
this._finalError(err);
}
};
Subject.prototype._finalError = function (err) {
var index = -1;
var observers = this.observers;
var len = observers.length;
// optimization -- block next, complete, and unsubscribe while dispatching
this.observers = void 0;
// optimization to block our SubjectSubscriptions from
// splicing themselves out of the observers list one by one.
this.observers = null;
this.isUnsubscribed = true;
while (++index < len) {
observers[index].error(err);
if (observers) {
var len = observers.length;
while (++index < len) {
observers[index].error(err);
}
}
this.isUnsubscribed = false;
this.unsubscribe();
};
Subject.prototype._complete = function () {
if (this.destination) {
this.destination.complete();
}
else {
this._finalComplete();
}
};
Subject.prototype._finalComplete = function () {
var index = -1;
var observers = this.observers;
var len = observers.length;
// optimization -- block next, complete, and unsubscribe while dispatching
this.observers = void 0; // optimization
// optimization to block our SubjectSubscriptions from
// splicing themselves out of the observers list one by one.
this.observers = null;
this.isUnsubscribed = true;
while (++index < len) {
observers[index].complete();
if (observers) {
var len = observers.length;
while (++index < len) {
observers[index].complete();
}
}
this.isUnsubscribed = false;
this.unsubscribe();
};
Subject.prototype[rxSubscriber_1.rxSubscriber] = function () {
return new Subscriber_1.Subscriber(this);
};
Subject.create = function (source, destination) {
return new Subject(source, destination);
};
return Subject;
})(Observable_1.Observable);
exports.Subject = Subject;
var BidirectionalSubject = (function (_super) {
__extends(BidirectionalSubject, _super);
function BidirectionalSubject(source, destination) {
_super.call(this);
this.source = source;
this.destination = destination;
}
BidirectionalSubject.prototype._subscribe = function (subscriber) {
var operator = this.operator;
return this.source._subscribe.call(this.source, operator ? operator.call(subscriber) : subscriber);
};
BidirectionalSubject.prototype.next = function (value) {
subscriberNext.call(this, value);
};
BidirectionalSubject.prototype.error = function (err) {
subscriberError.call(this, err);
};
BidirectionalSubject.prototype.complete = function () {
subscriberComplete.call(this);
};
BidirectionalSubject.prototype._next = function (value) {
_subscriberNext.call(this, value);
};
BidirectionalSubject.prototype._error = function (err) {
_subscriberError.call(this, err);
};
BidirectionalSubject.prototype._complete = function () {
_subscriberComplete.call(this);
};
return BidirectionalSubject;
})(Subject);
//# sourceMappingURL=Subject.js.map

@@ -5,9 +5,7 @@ import { Subject } from '../Subject';

export declare class AsyncSubject<T> extends Subject<T> {
_value: T;
_hasNext: boolean;
_isScalar: boolean;
constructor();
_subscribe(subscriber: Subscriber<any>): Subscription<T>;
_next(value: T): void;
_complete(): void;
value: T;
hasNext: boolean;
_subscribe(subscriber: Subscriber<any>): Subscription | Function | void;
protected _next(value: T): void;
protected _complete(): void;
}

@@ -10,10 +10,9 @@ var __extends = (this && this.__extends) || function (d, b) {

function AsyncSubject() {
_super.call(this);
this._value = void 0;
this._hasNext = false;
this._isScalar = false;
_super.apply(this, arguments);
this.value = null;
this.hasNext = false;
}
AsyncSubject.prototype._subscribe = function (subscriber) {
if (this.completeSignal && this._hasNext) {
subscriber.next(this._value);
if (this.hasCompleted && this.hasNext) {
subscriber.next(this.value);
}

@@ -23,4 +22,4 @@ return _super.prototype._subscribe.call(this, subscriber);

AsyncSubject.prototype._next = function (value) {
this._value = value;
this._hasNext = true;
this.value = value;
this.hasNext = true;
};

@@ -31,9 +30,9 @@ AsyncSubject.prototype._complete = function () {

var len = observers.length;
// optimization -- block next, complete, and unsubscribe while dispatching
this.observers = void 0; // optimization
// optimization to block our SubjectSubscriptions from
// splicing themselves out of the observers list one by one.
this.isUnsubscribed = true;
if (this._hasNext) {
if (this.hasNext) {
while (++index < len) {
var o = observers[index];
o.next(this._value);
o.next(this.value);
o.complete();

@@ -48,2 +47,3 @@ }

this.isUnsubscribed = false;
this.unsubscribe();
};

@@ -50,0 +50,0 @@ return AsyncSubject;

@@ -6,10 +6,8 @@ import { Subject } from '../Subject';

private _value;
private _hasError;
private _err;
constructor(_value: T);
getValue(): T;
value: T;
_subscribe(subscriber: Subscriber<any>): Subscription<T>;
_next(value: T): void;
_error(err: any): void;
_subscribe(subscriber: Subscriber<T>): Subscription | Function | void;
protected _next(value: T): void;
protected _error(err: any): void;
}

@@ -14,7 +14,6 @@ var __extends = (this && this.__extends) || function (d, b) {

this._value = _value;
this._hasError = false;
}
BehaviorSubject.prototype.getValue = function () {
if (this._hasError) {
throwError_1.throwError(this._err);
if (this.hasErrored) {
throwError_1.throwError(this.errorValue);
}

@@ -37,6 +36,3 @@ else if (this.isUnsubscribed) {

var subscription = _super.prototype._subscribe.call(this, subscriber);
if (!subscription) {
return;
}
else if (!subscription.isUnsubscribed) {
if (subscription && !subscription.isUnsubscribed) {
subscriber.next(this._value);

@@ -50,4 +46,4 @@ }

BehaviorSubject.prototype._error = function (err) {
this._hasError = true;
_super.prototype._error.call(this, this._err = err);
this.hasErrored = true;
_super.prototype._error.call(this, this.errorValue = err);
};

@@ -54,0 +50,0 @@ return BehaviorSubject;

@@ -6,11 +6,11 @@ import { Subject } from '../Subject';

export declare class ReplaySubject<T> extends Subject<T> {
private events;
private scheduler;
private bufferSize;
private _windowTime;
private scheduler;
private events;
constructor(bufferSize?: number, windowTime?: number, scheduler?: Scheduler);
_next(value: T): void;
_subscribe(subscriber: Subscriber<any>): Subscription<T>;
private windowSize;
constructor(bufferSize?: number, windowSize?: number, scheduler?: Scheduler);
protected _next(value: T): void;
_subscribe(subscriber: Subscriber<T>): Subscription | Function | void;
private _getNow();
private _trimBufferThenGetEvents(now);
}

@@ -8,12 +8,13 @@ var __extends = (this && this.__extends) || function (d, b) {

var queue_1 = require('../scheduler/queue');
var observeOn_support_1 = require('../operator/observeOn-support');
var ReplaySubject = (function (_super) {
__extends(ReplaySubject, _super);
function ReplaySubject(bufferSize, windowTime, scheduler) {
function ReplaySubject(bufferSize, windowSize, scheduler) {
if (bufferSize === void 0) { bufferSize = Number.POSITIVE_INFINITY; }
if (windowTime === void 0) { windowTime = Number.POSITIVE_INFINITY; }
if (windowSize === void 0) { windowSize = Number.POSITIVE_INFINITY; }
_super.call(this);
this.events = [];
this.scheduler = scheduler;
this.bufferSize = bufferSize < 1 ? 1 : bufferSize;
this._windowTime = windowTime < 1 ? 1 : windowTime;
this.scheduler = scheduler;
this.windowSize = windowSize < 1 ? 1 : windowSize;
}

@@ -28,5 +29,9 @@ ReplaySubject.prototype._next = function (value) {

var events = this._trimBufferThenGetEvents(this._getNow());
var scheduler = this.scheduler;
if (scheduler) {
subscriber.add(subscriber = new observeOn_support_1.ObserveOnSubscriber(subscriber, scheduler));
}
var index = -1;
var len = events.length;
while (!subscriber.isUnsubscribed && ++index < len) {
while (++index < len && !subscriber.isUnsubscribed) {
subscriber.next(events[index].value);

@@ -41,3 +46,3 @@ }

var bufferSize = this.bufferSize;
var _windowTime = this._windowTime;
var windowSize = this.windowSize;
var events = this.events;

@@ -50,3 +55,3 @@ var eventsCount = events.length;

while (spliceCount < eventsCount) {
if ((now - events[spliceCount].time) < _windowTime) {
if ((now - events[spliceCount].time) < windowSize) {
break;

@@ -53,0 +58,0 @@ }

import { Subject } from '../Subject';
import { Observer } from '../Observer';
import { Subscription } from '../Subscription';
import { Observer } from '../Observer';
export declare class SubjectSubscription<T> extends Subscription<T> {
subject: Subject<T>;
export declare class SubjectSubscription extends Subscription {
subject: Subject<any>;
observer: Observer<any>;
isUnsubscribed: boolean;
constructor(subject: Subject<T>, observer: Observer<any>);
constructor(subject: Subject<any>, observer: Observer<any>);
unsubscribe(): void;
}

@@ -7,3 +7,2 @@ var __extends = (this && this.__extends) || function (d, b) {

var Subscription_1 = require('../Subscription');
var Subscriber_1 = require('../Subscriber');
var SubjectSubscription = (function (_super) {

@@ -24,9 +23,6 @@ __extends(SubjectSubscription, _super);

var observers = subject.observers;
this.subject = void 0;
this.subject = null;
if (!observers || observers.length === 0 || subject.isUnsubscribed) {
return;
}
if (this.observer instanceof Subscriber_1.Subscriber) {
this.observer.unsubscribe();
}
var subscriberIndex = observers.indexOf(this.observer);

@@ -33,0 +29,0 @@ if (subscriberIndex !== -1) {

import { Observer } from './Observer';
import { Subscription } from './Subscription';
export declare class Subscriber<T> extends Subscription<T> implements Observer<T> {
export declare class Subscriber<T> extends Subscription implements Observer<T> {
static create<T>(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber<T>;
protected isStopped: boolean;
protected destination: Observer<any>;
protected _subscription: Subscription<T>;
protected _isUnsubscribed: boolean;
isUnsubscribed: boolean;
static create<T>(next?: (x?: T) => void, error?: (e?: any) => void, complete?: () => void): Subscriber<T>;
constructor(destination?: Observer<any>);
add(sub: Subscription<any> | Function | void): void;
remove(sub: Subscription<any>): void;
unsubscribe(): void;
_next(value: T): void;
_error(err: any): void;
_complete(): void;
next(value?: T): void;
error(err?: any): void;
complete(): void;
unsubscribe(): void;
protected _next(value: T): void;
protected _error(err: any): void;
protected _complete(): void;
}

@@ -8,124 +8,103 @@ var __extends = (this && this.__extends) || function (d, b) {

var throwError_1 = require('./util/throwError');
var tryOrOnError_1 = require('./util/tryOrOnError');
var tryOrThrowError_1 = require('./util/tryOrThrowError');
var Subscription_1 = require('./Subscription');
var rxSubscriber_1 = require('./symbol/rxSubscriber');
var Observer_1 = require('./Observer');
var Subscriber = (function (_super) {
__extends(Subscriber, _super);
function Subscriber(destination) {
if (destination === void 0) { destination = Observer_1.empty; }
_super.call(this);
this.isStopped = false;
this.destination = destination;
this._isUnsubscribed = false;
if (!this.destination) {
if (!destination ||
(destination instanceof Subscriber) ||
(destination === Observer_1.empty)) {
return;
}
var subscription = destination._subscription;
if (subscription) {
this._subscription = subscription;
if (typeof destination.next !== 'function') {
destination.next = noop_1.noop;
}
else if (destination instanceof Subscriber) {
this._subscription = destination;
if (typeof destination.error !== 'function') {
destination.error = throwError_1.throwError;
}
if (typeof destination.complete !== 'function') {
destination.complete = noop_1.noop;
}
}
Subscriber.prototype[rxSubscriber_1.rxSubscriber] = function () {
return this;
};
Object.defineProperty(Subscriber.prototype, "isUnsubscribed", {
get: function () {
var subscription = this._subscription;
if (subscription) {
// route to the shared Subscription if it exists
return this._isUnsubscribed || subscription.isUnsubscribed;
}
else {
return this._isUnsubscribed;
}
},
set: function (value) {
var subscription = this._subscription;
if (subscription) {
// route to the shared Subscription if it exists
subscription.isUnsubscribed = Boolean(value);
}
else {
this._isUnsubscribed = Boolean(value);
}
},
enumerable: true,
configurable: true
});
Subscriber.create = function (next, error, complete) {
var subscriber = new Subscriber();
subscriber._next = (typeof next === 'function') && tryOrOnError_1.tryOrOnError(next) || noop_1.noop;
subscriber._error = (typeof error === 'function') && error || throwError_1.throwError;
subscriber._complete = (typeof complete === 'function') && complete || noop_1.noop;
return subscriber;
return new SafeSubscriber(next, error, complete);
};
Subscriber.prototype.add = function (sub) {
// route add to the shared Subscription if it exists
var _subscription = this._subscription;
if (_subscription) {
_subscription.add(sub);
Subscriber.prototype.next = function (value) {
if (!this.isStopped) {
this._next(value);
}
else {
_super.prototype.add.call(this, sub);
};
Subscriber.prototype.error = function (err) {
if (!this.isStopped) {
this.isStopped = true;
this._error(err);
}
};
Subscriber.prototype.remove = function (sub) {
// route remove to the shared Subscription if it exists
if (this._subscription) {
this._subscription.remove(sub);
Subscriber.prototype.complete = function () {
if (!this.isStopped) {
this.isStopped = true;
this._complete();
}
else {
_super.prototype.remove.call(this, sub);
}
};
Subscriber.prototype.unsubscribe = function () {
if (this._isUnsubscribed) {
if (this.isUnsubscribed) {
return;
}
else if (this._subscription) {
this._isUnsubscribed = true;
}
else {
_super.prototype.unsubscribe.call(this);
}
this.isStopped = true;
_super.prototype.unsubscribe.call(this);
};
Subscriber.prototype._next = function (value) {
var destination = this.destination;
if (destination.next) {
destination.next(value);
}
this.destination.next(value);
};
Subscriber.prototype._error = function (err) {
var destination = this.destination;
if (destination.error) {
destination.error(err);
}
this.destination.error(err);
this.unsubscribe();
};
Subscriber.prototype._complete = function () {
var destination = this.destination;
if (destination.complete) {
destination.complete();
}
this.destination.complete();
this.unsubscribe();
};
Subscriber.prototype.next = function (value) {
if (!this.isUnsubscribed) {
Subscriber.prototype[rxSubscriber_1.rxSubscriber] = function () {
return this;
};
return Subscriber;
})(Subscription_1.Subscription);
exports.Subscriber = Subscriber;
var SafeSubscriber = (function (_super) {
__extends(SafeSubscriber, _super);
function SafeSubscriber(next, error, complete) {
_super.call(this);
this._next = (typeof next === 'function') && tryOrThrowError_1.tryOrThrowError(next) || null;
this._error = (typeof error === 'function') && tryOrThrowError_1.tryOrThrowError(error) || throwError_1.throwError;
this._complete = (typeof complete === 'function') && tryOrThrowError_1.tryOrThrowError(complete) || null;
}
SafeSubscriber.prototype.next = function (value) {
if (!this.isStopped && this._next) {
this._next(value);
}
};
Subscriber.prototype.error = function (err) {
if (!this.isUnsubscribed) {
this._error(err);
SafeSubscriber.prototype.error = function (err) {
if (!this.isStopped) {
if (this._error) {
this._error(err);
}
this.unsubscribe();
}
};
Subscriber.prototype.complete = function () {
if (!this.isUnsubscribed) {
this._complete();
SafeSubscriber.prototype.complete = function () {
if (!this.isStopped) {
if (this._complete) {
this._complete();
}
this.unsubscribe();
}
};
return Subscriber;
})(Subscription_1.Subscription);
exports.Subscriber = Subscriber;
return SafeSubscriber;
})(Subscriber);
//# sourceMappingURL=Subscriber.js.map

@@ -1,10 +0,8 @@

export declare class Subscription<T> {
static EMPTY: Subscription<void>;
export declare class Subscription {
static EMPTY: Subscription;
isUnsubscribed: boolean;
_subscriptions: Subscription<any>[];
_unsubscribe(): void;
constructor(_unsubscribe?: () => void);
unsubscribe(): void;
add(subscription: Subscription<any> | Function | void): void;
remove(subscription: Subscription<any>): void;
add(subscription: Subscription | Function | void): void;
remove(subscription: Subscription): void;
}

@@ -1,2 +0,4 @@

var noop_1 = require('./util/noop');
var isArray_1 = require('./util/isArray');
var isObject_1 = require('./util/isObject');
var isFunction_1 = require('./util/isFunction');
var Subscription = (function () {

@@ -9,5 +11,2 @@ function Subscription(_unsubscribe) {

}
Subscription.prototype._unsubscribe = function () {
noop_1.noop();
};
Subscription.prototype.unsubscribe = function () {

@@ -18,13 +17,15 @@ if (this.isUnsubscribed) {

this.isUnsubscribed = true;
var unsubscribe = this._unsubscribe;
var subscriptions = this._subscriptions;
this._subscriptions = void 0;
if (unsubscribe) {
unsubscribe.call(this);
var _a = this, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;
this._subscriptions = null;
if (isFunction_1.isFunction(_unsubscribe)) {
_unsubscribe.call(this);
}
if (subscriptions != null) {
if (isArray_1.isArray(_subscriptions)) {
var index = -1;
var len = subscriptions.length;
var len = _subscriptions.length;
while (++index < len) {
subscriptions[index].unsubscribe();
var subscription = _subscriptions[index];
if (isObject_1.isObject(subscription)) {
subscription.unsubscribe();
}
}

@@ -53,4 +54,3 @@ }

else {
var subscriptions = this._subscriptions || (this._subscriptions = []);
subscriptions.push(sub);
(this._subscriptions || (this._subscriptions = [])).push(sub);
}

@@ -57,0 +57,0 @@ break;

@@ -6,2 +6,3 @@ import { Observable } from '../Observable';

import { SubscriptionLoggable } from './SubscriptionLoggable';
import { Subscriber } from '../Subscriber';
export declare class ColdObservable<T> extends Observable<T> implements SubscriptionLoggable {

@@ -14,3 +15,3 @@ messages: TestMessage[];

constructor(messages: TestMessage[], scheduler: Scheduler);
scheduleMessages(subscriber: any): void;
scheduleMessages(subscriber: Subscriber<any>): void;
}

@@ -15,4 +15,4 @@ import { Subject } from '../Subject';

constructor(messages: TestMessage[], scheduler: Scheduler);
_subscribe(subscriber: Subscriber<any>): Subscription<T>;
_subscribe(subscriber: Subscriber<any>): Subscription | Function | void;
setup(): void;
}

@@ -1,3 +0,1 @@

export declare var errorObject: {
e: {};
};
export declare var errorObject: any;

@@ -0,2 +1,3 @@

// typeof any so that it we don't have to cast when comparing a result to the error object
exports.errorObject = { e: {} };
//# sourceMappingURL=errorObject.js.map

@@ -15,3 +15,3 @@ export declare class ImmediateDefinition {

partiallyApplied(handler: any, ...args: any[]): () => void;
addFromSetImmediateArguments(args: any): number;
addFromSetImmediateArguments(args: any[]): number;
createProcessNextTickSetImmediate(): () => any;

@@ -18,0 +18,0 @@ createPostMessageSetImmediate(): () => any;

@@ -8,5 +8,5 @@ /**

this.root = root;
if (root.setImmediate) {
this.setImmediate = root.setImmediate;
this.clearImmediate = root.clearImmediate;
if (root.setImmediate && typeof root.setImmediate === 'function') {
this.setImmediate = root.setImmediate.bind(root);
this.clearImmediate = root.clearImmediate.bind(root);
}

@@ -13,0 +13,0 @@ else {

@@ -1,1 +0,1 @@

export declare const isArray: (x: any) => boolean;
export declare const isArray: (arg: any) => arg is any[];

@@ -1,1 +0,1 @@

export declare function isDate(value: any): boolean;
export declare function isDate(value: any): value is Date;

@@ -1,1 +0,1 @@

export declare function isNumeric(val: any): boolean;
export declare function isNumeric(val: any): val is number;

@@ -1,2 +0,2 @@

var is_array = Array.isArray;
var isArray_1 = require('../util/isArray');
function isNumeric(val) {

@@ -7,3 +7,3 @@ // parseFloat NaNs numeric-cast false positives (null|true|false|"")

// adding 1 corrects loss of precision from parseFloat (#15100)
return !is_array(val) && (val - parseFloat(val) + 1) >= 0;
return !isArray_1.isArray(val) && (val - parseFloat(val) + 1) >= 0;
}

@@ -10,0 +10,0 @@ exports.isNumeric = isNumeric;

@@ -1,1 +0,1 @@

export declare function isPromise(value: any): boolean;
export declare function isPromise<T>(value: any | Promise<T>): value is Promise<T>;

@@ -1,1 +0,2 @@

export declare function isScheduler(value: any): boolean;
import { Scheduler } from '../Scheduler';
export declare function isScheduler<T>(value: any): value is Scheduler;

@@ -8,3 +8,3 @@ export declare class MapPolyfill {

delete(key: any): boolean;
forEach(cb: any, thisArg: any): void;
forEach(cb: Function, thisArg: any): void;
}
import { Subscription } from '../Subscription';
import { OuterSubscriber } from '../OuterSubscriber';
export declare function subscribeToResult<T, R>(outerSubscriber: OuterSubscriber<T, R>, result: any, outerValue?: T, outerIndex?: number): Subscription<T>;
export declare function subscribeToResult<T, R>(outerSubscriber: OuterSubscriber<T, R>, result: any, outerValue?: T, outerIndex?: number): Subscription;

@@ -0,5 +1,7 @@

var root_1 = require('./root');
var isArray_1 = require('./isArray');
var isPromise_1 = require('./isPromise');
var Observable_1 = require('../Observable');
var SymbolShim_1 = require('../util/SymbolShim');
var InnerSubscriber_1 = require('../InnerSubscriber');
var isArray = Array.isArray;
function subscribeToResult(outerSubscriber, result, outerValue, outerIndex) {

@@ -20,3 +22,3 @@ var destination = new InnerSubscriber_1.InnerSubscriber(outerSubscriber, outerValue, outerIndex);

}
if (isArray(result)) {
if (isArray_1.isArray(result)) {
for (var i = 0, len = result.length; i < len && !destination.isUnsubscribed; i++) {

@@ -29,6 +31,6 @@ destination.next(result[i]);

}
else if (typeof result.then === 'function') {
result.then(function (x) {
else if (isPromise_1.isPromise(result)) {
result.then(function (value) {
if (!destination.isUnsubscribed) {
destination.next(x);
destination.next(value);
destination.complete();

@@ -39,3 +41,3 @@ }

// Escaping the Promise trap: globally throw unhandled errors
setTimeout(function () { throw err; });
root_1.root.setTimeout(function () { throw err; });
});

@@ -42,0 +44,0 @@ return destination;

@@ -1,1 +0,1 @@

export declare function tryCatch(fn: Function): Function;
export declare function tryCatch<T extends Function>(fn: T): T;

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc