title: Argument of type 'Observable<unknown>' is not assignable to parameter of type 'OperatorFunction<boolean, unknown>'
body: <p>Service Code -</p>
  <pre><code>private flgCityMismatch$ = new BehaviorSubject&lt;boolean&gt;(false);
  flgCityMismatchVal = this.flgCityMismatch$.asObservable();
  
  setflgCityMismatch(value: boolean) {
      this.flgCityMismatch$.next(value);
  }
  </code></pre>
  <p>In Component, I am calling setflgCityMismatch to set the value according to the user action-</p>
  <pre><code>showProfileDetailsLink(redirectURl: string) {
      this.dataService.setflgCityMismatch(true);
      this.router.navigate([redirectURl]);
  }
  </code></pre>
  <p>I m calling subscribe to this BehaviorSubject like below -</p>
  <pre><code>this.dataservice_mylocation.flgCityMismatchVal.subscribe(data =&gt; flgCityMismatch = data);
  </code></pre>
  <p>I want to unsubscribe after assigning the value. I tried -</p>
  <pre><code>let flgCityMismatch = false;
       this.dataservice_mylocation.flgCityMismatchVal
            .pipe(take(1)) // this is throwing error 
            .subscribe(data =&gt; flgCityMismatch = data);
  </code></pre>
  <p>But I getting below error -</p>
  <pre><code>&quot;message&quot;: &quot;Argument of type 'Observable&lt;unknown&gt;' is not assignable to parameter of type 'OperatorFunction&lt;boolean, unknown&gt;'.\n  Type 'Observable&lt;unknown&gt;' provides no match for the signature '(source: Observable&lt;boolean&gt;): Observable&lt;unknown&gt;'.&quot;,
  </code></pre>
  <p>I am using Angular 8. I don't know what is the issue. I have tried takeUntil as well but it also throws the same error.</p>