"use strict"; var toArray_1 = require('../operators/toArray'); /** * Collects all source emissions and emits them as an array when the source completes. * * Get all values inside an array when the source completes * * * * `toArray` will wait until the source Observable completes * before emitting the array containing all emissions. * When the source Observable errors no array will be emitted. * * @example Create array from input * const input = Rx.Observable.interval(100).take(4); * * input.toArray() * .subscribe(arr => console.log(arr)); // [0,1,2,3] * * @see {@link buffer} * * @return {Observable|WebSocketSubject|Observable} * @method toArray * @owner Observable */ function toArray() { return toArray_1.toArray()(this); } exports.toArray = toArray; //# sourceMappingURL=toArray.js.map