title: Extend multiple interface in TypeScript with OR condition
body: <p>I Have three interface</p>
  <pre><code>inteface A {
      name: string
      id: number
      address: string
      details : object
  }
  
     inteface B {
          name: string
          id: string
          address: string
          details : string
          age: number
      }
  
  
  
  inteface C {
          name: string
          id: string
          address: object
          details : object
          age: number
          height: number
      }
  </code></pre>
  <p><strong>YES You noticed right different interfaces may have different types with the common fields</strong>
  like <strong>interface A</strong> have <code>id: number</code> but <strong>B</strong> have <code>id: string</code></p>
  <p>Now I have a common interface</p>
  <pre><code>interface Common {
     group: string
     class: string
  }
  </code></pre>
  <p>Now I have a function which is accepting parameter Object which will definitely have <strong>interface Common</strong> fields but may have fields of one of the interfaces A, B, and C</p>
  <p>I want to use the <code>Common</code> which will extend either of the interface in it <code>A</code>, <code>B</code>, and <code>C</code></p>
  <pre><code>function insert(params: Common){
     ....
  }
  
         
  </code></pre>
  <p>Now I thought of using generic but I failed in doing what I want,
  So can someone tell me how can I use this with generics and get what I wanted if it can be done through generic,</p>
  <p>If not suggest me another method to do so.</p>