import { Stream } from '../index'; /** * Group consecutive pairs of events as arrays. Each array has two items. * * Marble diagram: * * ```text * ---1---2-----3-----4-----5--------| * pairwise * -------[1,2]-[2,3]-[3,4]-[4,5]----| * ``` * * Example: * * ```js * import pairwise from 'xstream/extra/pairwise' * * const stream = xs.of(1, 2, 3, 4, 5, 6).compose(pairwise) * * stream.addListener({ * next: i => console.log(i), * error: err => console.error(err), * complete: () => console.log('completed') * }) * ``` * * ```text * > [1,2] * > [2,3] * > [3,4] * > [4,5] * > [5,6] * > completed * ``` * * @return {Stream} */ export default function pairwise(ins: Stream): Stream<[T, T]>;