title: WHat's the best way to take a first defined value from a stream and unsubscribe in RxJS?
body: <p>I have the following code:</p>
  
  <pre><code>this.type$.pipe(
          filter(val =&gt; !!val), // skip initial undefined value
          take(1), // unsubscribe after geting the first defined value
          map((type) =&gt; {
            this.store.dispatch(new LoadForms(type.schemaUid));
          })
        ).subscribe();
  </code></pre>
  
  <p>This is the pattern I use in few places across my app. Is there a way to shorten that by using any smarter RxJS operator? It should take just the value that is defined and immediately unsubscribe then.</p>