Version: 0.0.11.0.01.0.11.0.21.0.31.0.41.0.51.0.71.0.81.1.01.1.12.0.02.0.12.0.22.1.02.1.12.1.22.1.32.1.42.2.02.2.12.3.02.4.02.4.12.4.22.4.32.5.02.6.02.6.12.6.23.0.04.0.04.0.14.0.24.0.34.0.45.0.25.0.35.0.45.0.55.0.65.1.05.1.15.1.25.1.35.1.45.2.05.2.15.2.25.2.35.2.45.3.05.3.15.3.25.3.35.3.45.3.55.3.66.0.06.1.06.2.06.3.06.3.16.3.26.4.06.4.16.5.06.6.07.0.08.0.09.0.09.1.09.2.09.3.010.0.010.1.010.2.010.3.010.4.010.5.010.6.010.7.010.8.010.9.011.0.0-rc.111.0.011.1.011.2.011.3.011.4.011.5.011.6.011.7.011.8.011.9.011.10.011.11.011.12.011.13.011.14.0
import { Stream } from '../index';
/**
* Buffers a stream using a separator stream. Returns a stream that emits
* arrays.
*
* Marble diagram:
* ```text
* --1--2--3--4--5--6--7--8--9|
* buffer( -a---------b---------c| )
* ---------[1,2,3]---[4,5,6]---[7,8,9]|
* ```
* Example:
* ```js
* import buffer from 'xstream/extra/buffer'
* const source = xs.periodic(50).take(10);
* const separator = xs.periodic(170).take(3);
* const buffered = source.compose(buffer(separator));
* buffered.addListener({
* next: arr => console.log(arr),
* error: err => console.error(err)
* });
* > [0, 1, 2]
* > [3, 4, 5]
* > [6, 7, 8]
* @param {Stream} separator Some other stream that is used to know when to
* split the output stream.
* @return {Stream}
*/
export default function buffer<T>(s: Stream<any>): (ins: Stream<T>) => Stream<Array<T>>;