Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/entity-manager/EntityManager.ts
Expand Up @@ -957,7 +957,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> {
Expand Down Expand Up @@ -988,7 +988,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> {
Expand All @@ -1006,7 +1006,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> {
Expand Down Expand Up @@ -1126,7 +1126,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]> {
Expand All @@ -1145,7 +1145,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]> {
Expand Down