This commit is contained in:
cupcakearmy 2020-09-07 17:48:39 +02:00
parent 11e5891caf
commit 17eae1b647
No known key found for this signature in database
GPG Key ID: D28129AE5654D9D9

View File

@ -10,6 +10,7 @@ export abstract class BaseEntity {
return orm.em.getRepository<T>(this) return orm.em.getRepository<T>(this)
} }
// Native Functions
static count<T extends BaseEntity>(this: ObjectType<T>, ...args: Parameters<EntityRepository<T>['count']>): ReturnType<EntityRepository<T>['count']> { static count<T extends BaseEntity>(this: ObjectType<T>, ...args: Parameters<EntityRepository<T>['count']>): ReturnType<EntityRepository<T>['count']> {
return (this as any).getRepo().count(...args) return (this as any).getRepo().count(...args)
} }