With braking changes that sequelize introduced in new version 6.19.1
async findByUuid(uuid: string, options?: Omit<FindOptions<T>, 'where'>): Promise<T | null> {
return this.model.findOne<T>({ where: { uuid }, ...options });
}
I am getting error for "where"
No overload matches this call. Overload 1 of 2, '(this: ModelStatic, options: NonNullFindOptions<Attributes>): Promise', gave the following error. Type '{ uuid: string; }' is not assignable to type 'WhereOptions<Attributes>'. Types of property 'uuid' are incompatible. Type 'string' is not assignable to type 'WhereAttributeHashValue<Attributes[string]>'. Overload 2 of 2, '(this: ModelStatic, options?: FindOptions<Attributes>): Promise', gave the following error. Type '{ uuid: string; }' is not assignable to type 'WhereOptions<Attributes>'. Types of property 'uuid' are incompatible. Type 'string' is not assignable to type 'WhereAttributeHashValue<Attributes[string]>'.ts(2769) model.d.ts(52, 3): The expected type comes from property 'where' which is declared here on type 'NonNullFindOptions<Attributes>' model.d.ts(52, 3): The expected type comes from property 'where' which is declared here on type 'FindOptions<Attributes>'