Skip to content

Commit be69116

Browse files
authored
fix: Corrected missing promises in functions that should have been present
1 parent b5c761b commit be69116

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/core/src/assemblers/class-transformer.assembler.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ export abstract class ClassTransformerAssembler<DTO, Entity extends DeepPartial<
1717
DeepPartial<DTO>,
1818
DeepPartial<Entity>
1919
> {
20-
public convertToDTO(entity: Entity): DTO {
20+
public convertToDTO(entity: Entity): DTO | Promise<DTO> {
2121
return this.convert(this.DTOClass, this.toPlain(entity))
2222
}
2323

24-
public convertToEntity(dto: DTO): Entity {
24+
public convertToEntity(dto: DTO): Entity | Promise<Entity> {
2525
return this.convert(this.EntityClass, this.toPlain(dto))
2626
}
2727

@@ -37,11 +37,11 @@ export abstract class ClassTransformerAssembler<DTO, Entity extends DeepPartial<
3737
return aggregate as unknown as AggregateResponse<DTO>
3838
}
3939

40-
public convertToCreateEntity(create: DeepPartial<DTO>): DeepPartial<Entity> {
40+
public convertToCreateEntity(create: DeepPartial<DTO>): DeepPartial<Entity> | Promise<DeepPartial<Entity>> {
4141
return this.convert(this.EntityClass, create)
4242
}
4343

44-
public convertToUpdateEntity(create: DeepPartial<DTO>): DeepPartial<Entity> {
44+
public convertToUpdateEntity(create: DeepPartial<DTO>): DeepPartial<Entity> | Promise<DeepPartial<Entity>> {
4545
return this.convert(this.EntityClass, create)
4646
}
4747

0 commit comments

Comments
 (0)