Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

158
Views
Sequelize where issue with 6.19.1 version

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>'

about 4 years ago · Santiago Gelvez
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!