fix: add async to the method using setFindOptions() (#10787)

Co-authored-by: Giorgio Boa <35845425+gioboa@users.noreply.github.com>
Co-authored-by: Naor Peled <me@naor.dev>
This commit is contained in:
Wonbin Choi 2025-12-07 04:50:43 +09:00 committed by GitHub
parent a46eb0a7e1
commit cc07c90f1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -971,7 +971,7 @@ export class EntityManager {
/**
* Checks whether any entity exists with the given options.
*/
exists<Entity extends ObjectLiteral>(
async exists<Entity extends ObjectLiteral>(
entityClass: EntityTarget<Entity>,
options?: FindManyOptions<Entity>,
): Promise<boolean> {
@ -1002,7 +1002,7 @@ export class EntityManager {
* Counts entities that match given options.
* Useful for pagination.
*/
count<Entity extends ObjectLiteral>(
async count<Entity extends ObjectLiteral>(
entityClass: EntityTarget<Entity>,
options?: FindManyOptions<Entity>,
): Promise<number> {
@ -1020,7 +1020,7 @@ export class EntityManager {
* Counts entities that match given conditions.
* Useful for pagination.
*/
countBy<Entity extends ObjectLiteral>(
async countBy<Entity extends ObjectLiteral>(
entityClass: EntityTarget<Entity>,
where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[],
): Promise<number> {
@ -1144,7 +1144,7 @@ export class EntityManager {
* Also counts all entities that match given conditions,
* but ignores pagination settings (from and take options).
*/
findAndCount<Entity extends ObjectLiteral>(
async findAndCount<Entity extends ObjectLiteral>(
entityClass: EntityTarget<Entity>,
options?: FindManyOptions<Entity>,
): Promise<[Entity[], number]> {
@ -1163,7 +1163,7 @@ export class EntityManager {
* Also counts all entities that match given conditions,
* but ignores pagination settings (from and take options).
*/
findAndCountBy<Entity extends ObjectLiteral>(
async findAndCountBy<Entity extends ObjectLiteral>(
entityClass: EntityTarget<Entity>,
where: FindOptionsWhere<Entity> | FindOptionsWhere<Entity>[],
): Promise<[Entity[], number]> {