how to unsubscribe timer in angular 6? : I am facing problem while working with timer in angular 6. I am not able to unsubscribe timer after certain meet condition.

this.testInterval=interval(1000).pipe(
      map(x => this.testSecTime )
    ).subscribe(
      
       x => this.reduceTimer()
    );