title: Implementing Interfaces in NodeJS
body: <p>The NodeJS Documentation states:</p>
  
  <blockquote>
    <p>"The request object is an instance of IncomingMessage. The request
    object that's passed in to a handler implements the ReadableStream
    interface"</p>
    
    <p>"So far we haven't touched on the response object at all, which is an
    instance of ServerResponse, which is a WritableStream."</p>
  </blockquote>
  
  <p>JS has Prototypal Inheritance so when the documentation says it is an
  instance it means it adds to the prototype chain, but how it
  implements an Interface in JS?</p>
  
  <p>And how is this all chained up and how it works. 
  The Official NodeJS Documentation does not explain.</p>
  
  <p>Source - <a href="https://nodejs.org/en/docs/guides/anatomy-of-an-http-transaction/" rel="noreferrer">Anatomy of an HTTP Transaction</a></p>
  
  <p>Edit- My Question is not related to multiple Inheritance in JS. It is about how NodeJS modules implements interface which is natively not supported in JS. I beg your Pardon if there is any mistake in my question or lacking in my knowledge. Thanks!</p>