license import { noop , Subscriber } from "rxjs" ; export class DoneSubscriber < T > extends Subscriber < T > { constructor ( private onError , onComplete ) { super ( { complete : onComplete , error : onError , next : noop , } ) ; } unsubscribe ( ) { try { super . unsubscribe ( ) ; } catch ( error ) { this . onError ( error ) ; } } }