After update to Typescript 3.5 i'm getting a lot of "Type instantiation is excessively deep and possibly infinite.ts(2589)" errors.
How can I ignore them?
Where the code happens (using TypeORM)
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<MyEntity> = connection.getRepository(MyEntity); // only here cast the error above
}
}
I noted that only the repo2
initialization cast the error message.