import {not} from '../util/not'; import {filter} from './filter'; import {Observable} from '../Observable'; /** * @param predicate * @param thisArg * @return {Observable[]} * @method partition * @owner Observable */ export function partition(predicate: (value: T) => boolean, thisArg?: any): [Observable, Observable] { return [ filter.call(this, predicate), filter.call(this, not(predicate, thisArg)) ]; } export interface PartitionSignature { (predicate: (value: T) => boolean, thisArg?: any): [Observable, Observable]; }