title: Angular 7 Websocket handle Subject<MessageEvent>
body: <p>I am trying to implement a very simple WebSockets based Angular application, that I got from an example.
  The connection is established like this:</p>
  
  <pre><code>public connect(url): Subject&lt;MessageEvent&gt; {
  if (!this.subject) {
    this.subject = this.create(url);
    console.log('Successfully connected: ' + url);
  }
  return this.subject;
  </code></pre>
  
  <p>}</p>
  
  <p>And this is how I am trying to adapt the output from our websocket - but .map does not exist and I have been looking at how to handle Subject and I just cant get a handle on it</p>
  
  <pre><code>public messages: Observable&lt;Message&gt;;
  
  constructor(private wsService: WebsocketService) {
          this.messages = wsService.connect(CHAT_URL).map(
            (response: MessageEvent): Message =&gt; {
              const data = JSON.parse(response.data);
              return {
                author: data.author,
                message: data.message
              };
            }
          );
      }
  </code></pre>
  
  <p><strong>EDIT</strong>
  I get the following Error:</p>
  
  <pre><code>error TS2339: Property 'map' does not exist on type 'Subject&lt;MessageEvent&gt;'.
  </code></pre>