title: how to ignore "Type instantiation is excessively deep and possibly infinite. ts(2589)" typescript error?
body: <p>After update to Typescript 3.5 i'm getting a lot of "Type instantiation is excessively deep and possibly infinite.ts(2589)" errors.</p>
  
  <p>How can I ignore them?</p>
  
  <p>Where the code happens (using <a href="https://typeorm.io/" rel="noreferrer">TypeORM</a>)</p>
  
  <pre><code>import { Connection, Repository, Entity, BaseEntity,  createConnection } from 'typeorm';
  
  @Entity()
  class MyEntity extends BaseEntity {
      public id: number;
  }
  
  class Test {
      async test() {
          const connection: Connection = await createConnection();
          const repo1                       = connection.getRepository(MyEntity); 
          const repo2: Repository&lt;MyEntity&gt; = connection.getRepository(MyEntity); // only here cast the error above
      }
  }
  </code></pre>
  
  <p>I noted that only the <code>repo2</code> initialization cast the error message.</p>