In my situation, I am using a DTO that looks like this:
export class CreatePlotDTO {
@IsNumber()
@ApiProperty()
@IsOptional()
area: number;
@IsNumber()
@ApiProperty()
@IsOptional()
ownerID: number;
}
I also have a method named create. UPDATE: This method is located in the plotService and it accepts the above mentioned dto.
async createPlot(plot: CreatePlotDTO) {
return this.plotModel.create(plot)
}
Everything was working smoothly until recently when an error started occurring:
Argument of type 'CreatePlotDTO' is not assignable to parameter of type 'CreationAttributes<Plot>'.
Type 'CreatePlotDTO' is not assignable to type 'Omit<any, string>'.
Index signature is missing in type 'CreatePlotDTO'.
My suspicion is that the problem lies within either "sequelize": "^6.16.2" or "sequelize-typescript": "^2.1.3". Any ideas on how to resolve this issue?