title: Typescript: add prototype method for a object which implements and interface or extend DTO
body: <p>I need to be able to implement either static method against specific interface or extend a DTO which is implementing specific interface.</p>
  
  <p>Let me try to explain a bit with code:</p>
  
  <pre><code>interface Car {
        dateOfProduction: Date
  
        age: (car: Car) =&gt; number
      }
  </code></pre>
  
  <p>I am receiving from an API:</p>
  
  <pre><code>{ dateOfProduction: Date }
  </code></pre>
  
  <p>Loading it like this:</p>
  
  <pre><code>let car: Car = &lt;Car&gt; receivedDto;
  </code></pre>
  
  <p>I need to call something like</p>
  
  <pre><code>Car.age(car)
  </code></pre>
  
  <p>or if it's possible with prototyping?</p>
  
  <p>Thank you!</p>