Property 'subscribe' does not exist on type 'void'

Hi Team,

filter(value) {;//shows loading circle
    this.videos = [];//defines this.videos as an empty array
    let temp = this.ytProvider.getVideos(value);//defines temp as our http call in yt provider
    //we subscrive to videos of category value here    
    temp.subscribe(data => {
      data.forEach(res => {
        //if video is not present in videos array, we push it into the array
        if (this.videos.indexOf(res) == -1) {
      this.loading.hide();// hides loading circle
    }, err => {
      //shows error alert if there is an issue with our subscription
      let alert = this.alertCtrl.create({
        message: JSON.stringify(err),
        buttons: ['OK']
      this.loading.hide();//hides loading circle

Here I am getting this error.
Property ‘subscribe’ does not exist on type ‘void’.


instead of assign to temp variable else you can cast temp variable to observable check typescript type assertion