license import { Observable } from "rxjs" ; import { DoneSubscriber } from "../done-subscriber" ; export interface DoneFunction { ( ) : void ; fail : ( error : any ) => void ; } export function observe < T > ( observableTest ) { return ( done ) => { const subscriber = new DoneSubscriber ( done . fail , done ) ; observableTest ( ) . subscribe ( subscriber ) ; } ; }