danielmhanover / typeorm-upsert

37 stars 2 forks source link

TypeScript error when passing an Entity #4

Closed yagoferrer closed 4 years ago

yagoferrer commented 4 years ago

This is the error I'm getting: Argument of type 'typeof UserLocation' is not assignable to parameter of type 'ClassType'. The types of 'createQueryBuilder(...).connection.options' are incompatible between these types.

I do feel that it is not necessary to create the ClassType with the createQueryBuilder() method. TypeORM implementation might change in the future. I'm sending you a PR to fix this issue; also, in this fix TypeORM is no longer a dependency, which is a good thing.