Return an empty Observable
<p>The function <code>more()</code> is supposed to return an <code>Observable</code> from a get request</p>
<pre class="lang-ts prettyprint-override"><code>export class Collection {
  public more = (): Observable&lt;Response&gt; =&gt; {
    if (this.hasMore()) {
      return this.fetch();
    } else {
      // return empty observable
    }
  };

  private fetch = (): Observable&lt;Response&gt; =&gt; {
    return this.http.get(&quot;some-url&quot;).map((res) =&gt; {
      return res.json();
    });
  };
}
</code></pre>
<p>In this case I can only do a request if <code>hasMore()</code> is true, else I get an error on <code>subscribe()</code> function <code>subscribe is not defined</code>, how can I return an empty Observable?</p>
<pre class="lang-ts prettyprint-override"><code>this.collection.more().subscribe(
  (res) =&gt; {
    console.log(res);
  }, (err) =&gt; {
    console.log(err);
  }
);
</code></pre>