import { Observer } from "./Types" ; /**
 * Wrapper around a function that implements Observer<T>.
 */ export class ObserverFunction < T > implements Observer < T > { constructor ( private _onNext , private _onComplete , private _onError ) { } emit ( value ) { this . _onNext ( value ) ; } complete ( ) { this . _onComplete ( ) ; } error ( error ) { this . _onError ( error ) ; } }