title: A function whose declared type is neither 'void' nor 'any' must return a value
body: <p>In my angular2 app, I have service which send a get request to a url.</p>
  <p>Here is my service:</p>
  <pre><code>import {Http} from '@angular/http';
  import {Observable} from 'rxjs/Observable';
  import 'rxjs/add/operator/map';
  import {Injectable} from '@angular/core';
  import {Gallery} from './gallery';
  
  @Injectable()
  export class InstagramService{
  
      constructor(private _http:Http){
  
      }
  
      getGallery(username: string) : Observable&lt;Gallery&gt; {
          var result=this._http.get(&quot;https://www.instagram.com/&quot;+username+&quot;/media/&quot;).map(res =&gt; res.json());
      }
  
  }
  </code></pre>
  <p>I have defined the return type as <code>Observable&lt;Gallery&gt;</code>, but it complains that:</p>
  <pre><code>A function whose declared type is neither 'void' nor 'any' must return a value
  </code></pre>
  <p>What is going wrong with this code?</p>