title: Property 'subscribe' does not exist on type 'typeof Observable'
body: <p>Here is my service file  </p>
  
  <pre><code>import {Injectable} from '@angular/core';
  import {Subject} from 'rxjs/Subject';
  import {Observable} from 'rxjs/Observable';
  import * as io from 'socket.io-client';
  
  export class chatService{
      private url = 'http://localhost:8000'
      private socket:any;
  
      sendMessage(message:string){
          this.socket.emit('add-message', message);
      }
      getMessages(){
          let observable = new Observable(( observer:any)=&gt;{
              this.socket = io(this.url);
              this.socket.on('message',(data:any)=&gt;{
                  observer.next(data);
              });
              return () =&gt; {
                  this.socket.disconnect();
              }
          })
          return Observable;
      }
  }
  </code></pre>
  
  <p>And here is my subscribe method showing the error    </p>
  
  <pre><code>import { Component } from '@angular/core';
  import {chatService} from '../../services/chat.service';
  import { OnInit, OnDestroy } from '@angular/core/src/metadata/lifecycle_hooks';
  import { Message } from '@angular/compiler/src/i18n/i18n_ast';
  import * as io from 'socket.io-client';
  @Component({
    moduleId:module.id,
    selector: 'chat',
    templateUrl: `chat.componets.html`,
  })
  export class chatComponent implements OnInit, OnDestroy {connection: any;
   name = 'Angular'; 
  messages: any = [];
  message: string;
   constructor(private _chatService:chatService){
  
   }
   sendMessage(){
     this._chatService.sendMessage(this.message);
     this.message = '';
   }
   ngOnInit(){
    this.connection = this._chatService.getMessages().subscribe(message=&gt; {
        console.log(message);
        this.messages.push(message);
    });
   }
   ngOnDestroy(){
     this.connection.unsubscribe();
   }
  }
  </code></pre>
  
  <p>In service file in which i have to call <code>getMessage()</code> and when am going to subscribe the method in the other class where i am calling that service method <code>getMessage()</code>. It shows the error </p>
  
  <blockquote>
    <p>[ts] Property 'subscribe' does not exist on type 'typeof Observable'</p>
  </blockquote>
  
  <p>And another error says </p>
  
  <blockquote>
    <p>[ts] Parameter 'message' implicitly has an 'any' type. (parameter)
    message: any</p>
  </blockquote>